diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index afd2d388..ffbf0812 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -872,20 +872,19 @@ async fn send_invite(org_id: &str, data: Json, headers: AdminHeaders } for email in data.emails.iter() { - let email = email.to_lowercase(); let mut user_org_status = UserOrgStatus::Invited as i32; - let user = match User::find_by_mail(&email, &mut conn).await { + let user = match User::find_by_mail(email, &mut conn).await { None => { if !CONFIG.invitations_allowed() { err!(format!("User does not exist: {email}")) } - if !CONFIG.is_email_domain_allowed(&email) { + if !CONFIG.is_email_domain_allowed(email) { err!("Email domain not eligible for invitations") } if !CONFIG.mail_enabled() { - let invitation = Invitation::new(&email); + let invitation = Invitation::new(email); invitation.save(&mut conn).await?; } diff --git a/src/static/templates/email/send_org_invite.hbs b/src/static/templates/email/send_org_invite.hbs index b2c46f50..822c50b9 100644 --- a/src/static/templates/email/send_org_invite.hbs +++ b/src/static/templates/email/send_org_invite.hbs @@ -3,7 +3,7 @@ Join {{{org_name}}} You have been invited to join the *{{org_name}}* organization. -Click here to join: {{url}} +Click here to join: {{{url}}} If you do not wish to join this organization, you can safely ignore this email. diff --git a/src/static/templates/email/send_org_invite.html.hbs b/src/static/templates/email/send_org_invite.html.hbs index a78a89e9..ce3a6c05 100644 --- a/src/static/templates/email/send_org_invite.html.hbs +++ b/src/static/templates/email/send_org_invite.html.hbs @@ -9,7 +9,7 @@ Join {{{org_name}}} - Join Organization Now