From 3fed323385356c429e4e40030bd316047d27f5a1 Mon Sep 17 00:00:00 2001 From: BlackDex Date: Wed, 18 Nov 2020 12:04:16 +0100 Subject: [PATCH] Fixed plain/text email format plain/text emails should not contain html elements like

etc.. This triggers some spamfilters and increases the spam score. Also added the github link into the text only emails since this also triggers spamfilters to increase the score since the url/link count is different between the multipart messages. --- src/static/templates/email/change_email.hbs | 10 ++++++---- src/static/templates/email/delete_account.hbs | 18 ++++++++--------- .../templates/email/invite_accepted.hbs | 11 +++++----- .../templates/email/invite_confirmed.hbs | 11 +++++----- .../templates/email/new_device_logged_in.hbs | 18 ++++++++--------- src/static/templates/email/pw_hint_none.hbs | 5 ++++- src/static/templates/email/pw_hint_some.hbs | 9 ++++++--- .../templates/email/send_org_invite.hbs | 20 +++++++++---------- src/static/templates/email/smtp_test.hbs | 12 +++++------ .../templates/email/twofactor_email.hbs | 11 +++++----- src/static/templates/email/verify_email.hbs | 16 +++++++-------- src/static/templates/email/welcome.hbs | 12 +++++------ .../templates/email/welcome_must_verify.hbs | 18 ++++++++--------- 13 files changed, 84 insertions(+), 87 deletions(-) diff --git a/src/static/templates/email/change_email.hbs b/src/static/templates/email/change_email.hbs index 30008822..d2ed2d8f 100644 --- a/src/static/templates/email/change_email.hbs +++ b/src/static/templates/email/change_email.hbs @@ -1,6 +1,8 @@ Your Email Change - -

To finalize changing your email address enter the following code in web vault: {{token}}

-

If you did not try to change an email address, you can safely ignore this email.

- +To finalize changing your email address enter the following code in web vault: {{token}} + +If you did not try to change an email address, you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/delete_account.hbs b/src/static/templates/email/delete_account.hbs index 22425343..b8b6c8c2 100644 --- a/src/static/templates/email/delete_account.hbs +++ b/src/static/templates/email/delete_account.hbs @@ -1,12 +1,10 @@ Delete Your Account - -

-click the link below to delete your account. -
-
-
-Delete Your Account -

-

If you did not request this email to delete your account, you can safely ignore this email.

- +Click the link below to delete your account. + +Delete Your Account: {{url}}/#/verify-recover-delete?userId={{user_id}}&token={{token}}&email={{email}} + +If you did not request this email to delete your account, you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/invite_accepted.hbs b/src/static/templates/email/invite_accepted.hbs index bdb7afcb..641ce7f4 100644 --- a/src/static/templates/email/invite_accepted.hbs +++ b/src/static/templates/email/invite_accepted.hbs @@ -1,8 +1,7 @@ Invitation to {{{org_name}}} accepted - -

- Your invitation for {{email}} to join {{org_name}} was accepted. - Please log in to the bitwarden_rs server and confirm them from the organization management page. -

- +Your invitation for *{{email}}* to join *{{org_name}}* was accepted. +Please log in via {{url}} to the bitwarden_rs server and confirm them from the organization management page. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/invite_confirmed.hbs b/src/static/templates/email/invite_confirmed.hbs index acfbf972..f4fa2a9b 100644 --- a/src/static/templates/email/invite_confirmed.hbs +++ b/src/static/templates/email/invite_confirmed.hbs @@ -1,8 +1,7 @@ Invitation to {{{org_name}}} confirmed - -

- Your invitation to join {{org_name}} was confirmed. - It will now appear under the Organizations the next time you log in to the web vault. -

- +Your invitation to join *{{org_name}}* was confirmed. +It will now appear under the Organizations the next time you log in to the web vault at {{url}}. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/new_device_logged_in.hbs b/src/static/templates/email/new_device_logged_in.hbs index c3c6bf90..1c14fde1 100644 --- a/src/static/templates/email/new_device_logged_in.hbs +++ b/src/static/templates/email/new_device_logged_in.hbs @@ -1,14 +1,12 @@ New Device Logged In From {{{device}}} - -

- Your account was just logged into from a new device. +Your account was just logged into from a new device. - Date: {{datetime}} - IP Address: {{ip}} - Device Type: {{device}} +* Date: {{datetime}} +* IP Address: {{ip}} +* Device Type: {{device}} - You can deauthorize all devices that have access to your account from the - web vault under Settings > My Account > Deauthorize Sessions. -

- +You can deauthorize all devices that have access to your account from the web vault ( {{url}} ) under Settings > My Account > Deauthorize Sessions. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/pw_hint_none.hbs b/src/static/templates/email/pw_hint_none.hbs index 67a7a093..b62a65bf 100644 --- a/src/static/templates/email/pw_hint_none.hbs +++ b/src/static/templates/email/pw_hint_none.hbs @@ -2,6 +2,9 @@ Your master password hint You (or someone) recently requested your master password hint. Unfortunately, your account does not have a master password hint. -If you cannot remember your master password, there is no way to recover your data. The only option to gain access to your account again is to delete the account so that you can register again and start over. All data associated with your account will be deleted. +If you cannot remember your master password, there is no way to recover your data. The only option to gain access to your account again is to delete the account ( {{url}}/#/recover-delete ) so that you can register again and start over. All data associated with your account will be deleted. If you did not request your master password hint you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/pw_hint_some.hbs b/src/static/templates/email/pw_hint_some.hbs index f40d43e8..ba783ab1 100644 --- a/src/static/templates/email/pw_hint_some.hbs +++ b/src/static/templates/email/pw_hint_some.hbs @@ -2,9 +2,12 @@ Your master password hint You (or someone) recently requested your master password hint. -Your hint is: "{{hint}}" -Log in: Web Vault +Your hint is: *{{hint}}* +Log in to the web vault: {{url}} -If you cannot remember your master password, there is no way to recover your data. The only option to gain access to your account again is to delete the account so that you can register again and start over. All data associated with your account will be deleted. +If you cannot remember your master password, there is no way to recover your data. The only option to gain access to your account again is to delete the account ( {{url}}/#/recover-delete ) so that you can register again and start over. All data associated with your account will be deleted. If you did not request your master password hint you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/send_org_invite.hbs b/src/static/templates/email/send_org_invite.hbs index 340820b9..efe1d287 100644 --- a/src/static/templates/email/send_org_invite.hbs +++ b/src/static/templates/email/send_org_invite.hbs @@ -1,12 +1,12 @@ Join {{{org_name}}} - -

-You have been invited to join the {{org_name}} organization. -
-
- -Click here to join -

-

If you do not wish to join this organization, you can safely ignore this email.

- +You have been invited to join the *{{org_name}}* organization. + + +Click here to join: {{url}}/#/accept-organization/?organizationId={{org_id}}&organizationUserId={{org_user_id}}&email={{email}}&organizationName={{org_name}}&token={{token}} + + +If you do not wish to join this organization, you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/smtp_test.hbs b/src/static/templates/email/smtp_test.hbs index 9d16d223..cc37993d 100644 --- a/src/static/templates/email/smtp_test.hbs +++ b/src/static/templates/email/smtp_test.hbs @@ -1,8 +1,8 @@ Bitwarden_rs SMTP Test - -

-This is a test email to verify the SMTP configuration for {{url}}. -

-

When you can read this email it is probably configured correctly.

- +This is a test email to verify the SMTP configuration for {{url}}. + +When you can read this email it is probably configured correctly. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/twofactor_email.hbs b/src/static/templates/email/twofactor_email.hbs index b2cb1611..ca2745f6 100644 --- a/src/static/templates/email/twofactor_email.hbs +++ b/src/static/templates/email/twofactor_email.hbs @@ -1,9 +1,8 @@ Your Two-step Login Verification Code - -

- Your two-step verification code is: {{token}} +Your two-step verification code is: {{token}} - Use this code to complete logging in with Bitwarden. -

- +Use this code to complete logging in with Bitwarden. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/verify_email.hbs b/src/static/templates/email/verify_email.hbs index 06cf2c8d..7dabc80e 100644 --- a/src/static/templates/email/verify_email.hbs +++ b/src/static/templates/email/verify_email.hbs @@ -1,12 +1,10 @@ Verify Your Email - -

Verify this email address for your account by clicking the link below. -
-
- -Verify Email Address Now -

-

If you did not request to verify your account, you can safely ignore this email.

- + +Verify Email Address Now: {{url}}/#/verify-email/?userId={{user_id}}&token={{token}} + +If you did not request to verify your account, you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/welcome.hbs b/src/static/templates/email/welcome.hbs index 2717aa44..30bf6d6c 100644 --- a/src/static/templates/email/welcome.hbs +++ b/src/static/templates/email/welcome.hbs @@ -1,8 +1,8 @@ Welcome - -

-Thank you for creating an account at {{url}}. You may now log in with your new account. -

-

If you did not request to create an account, you can safely ignore this email.

- +Thank you for creating an account at {{url}}. You may now log in with your new account. + +If you did not request to create an account, you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs diff --git a/src/static/templates/email/welcome_must_verify.hbs b/src/static/templates/email/welcome_must_verify.hbs index 53cecfca..a21666e6 100644 --- a/src/static/templates/email/welcome_must_verify.hbs +++ b/src/static/templates/email/welcome_must_verify.hbs @@ -1,12 +1,10 @@ Welcome - -

-Thank you for creating an account at {{url}}. Before you can login with your new account, you must verify this email address by clicking the link below. -
-
- -Verify Email Address Now -

-

If you did not request to create an account, you can safely ignore this email.

- +Thank you for creating an account at {{url}}. Before you can login with your new account, you must verify this email address by clicking the link below. + +Verify Email Address Now: {{url}}/#/verify-email/?userId={{user_id}}&token={{token}} + +If you did not request to create an account, you can safely ignore this email. + +=== +Github: https://github.com/dani-garcia/bitwarden_rs