diff --git a/app/api/views/auth.py b/app/api/views/auth.py index 71602875..5fab8415 100644 --- a/app/api/views/auth.py +++ b/app/api/views/auth.py @@ -318,7 +318,7 @@ def auth_google(): def auth_payload(user, device) -> dict: - ret = {"name": user.name, "email": user.email, "mfa_enabled": user.enable_otp} + ret = {"name": user.name or "", "email": user.email, "mfa_enabled": user.enable_otp} # do not give api_key, user can only obtain api_key after OTP verification if user.enable_otp: diff --git a/app/api/views/auth_mfa.py b/app/api/views/auth_mfa.py index 754e356e..d0297970 100644 --- a/app/api/views/auth_mfa.py +++ b/app/api/views/auth_mfa.py @@ -55,7 +55,7 @@ def auth_mfa(): if not totp.verify(mfa_token): return jsonify(error="Wrong TOTP Token"), 400 - ret = {"name": user.name, "email": user.email} + ret = {"name": user.name or "", "email": user.email} api_key = ApiKey.get_by(user_id=user.id, name=device) if not api_key: diff --git a/app/api/views/user_info.py b/app/api/views/user_info.py index e5d3c367..935b63d4 100644 --- a/app/api/views/user_info.py +++ b/app/api/views/user_info.py @@ -14,7 +14,7 @@ from app.utils import random_string def user_to_dict(user: User) -> dict: ret = { - "name": user.name, + "name": user.name or "", "is_premium": user.is_premium(), "email": user.email, "in_trial": user.in_trial(), diff --git a/app/auth/views/fido.py b/app/auth/views/fido.py index 267e8837..c629df49 100644 --- a/app/auth/views/fido.py +++ b/app/auth/views/fido.py @@ -59,7 +59,7 @@ def fido(): browser = MfaBrowser.get_by(token=request.cookies.get("mfa")) if browser and not browser.is_expired() and browser.user_id == user.id: login_user(user) - flash(f"Welcome back {user.name}!", "success") + flash(f"Welcome back!", "success") # Redirect user to correct page return redirect(next_url or url_for("dashboard.index")) else: @@ -106,7 +106,7 @@ def fido(): del session[MFA_USER_ID] login_user(user) - flash(f"Welcome back {user.name}!", "success") + flash(f"Welcome back!", "success") # Redirect user to correct page response = make_response(redirect(next_url or url_for("dashboard.index"))) diff --git a/app/auth/views/mfa.py b/app/auth/views/mfa.py index d77f9f0b..a9bacec1 100644 --- a/app/auth/views/mfa.py +++ b/app/auth/views/mfa.py @@ -52,7 +52,7 @@ def mfa(): browser = MfaBrowser.get_by(token=request.cookies.get("mfa")) if browser and not browser.is_expired() and browser.user_id == user.id: login_user(user) - flash(f"Welcome back {user.name}!", "success") + flash(f"Welcome back!", "success") # Redirect user to correct page return redirect(next_url or url_for("dashboard.index")) else: @@ -70,7 +70,7 @@ def mfa(): db.session.commit() login_user(user) - flash(f"Welcome back {user.name}!", "success") + flash(f"Welcome back!", "success") # Redirect user to correct page response = make_response(redirect(next_url or url_for("dashboard.index"))) diff --git a/app/auth/views/recovery.py b/app/auth/views/recovery.py index 6824b035..aa788d47 100644 --- a/app/auth/views/recovery.py +++ b/app/auth/views/recovery.py @@ -50,7 +50,7 @@ def recovery_route(): del session[MFA_USER_ID] login_user(user) - flash(f"Welcome back {user.name}!", "success") + flash(f"Welcome back!", "success") recovery_code.used = True recovery_code.used_at = arrow.now() diff --git a/app/auth/views/register.py b/app/auth/views/register.py index f9ae7431..4858cfb7 100644 --- a/app/auth/views/register.py +++ b/app/auth/views/register.py @@ -110,4 +110,4 @@ def send_activation_email(user, next_url): LOG.d("redirect user to %s after activation", next_url) activation_link = activation_link + "&next=" + encode_url(next_url) - email_utils.send_activation_email(user.email, user.name, activation_link) + email_utils.send_activation_email(user.email, activation_link) diff --git a/app/dashboard/views/setting.py b/app/dashboard/views/setting.py index 9560c4ef..cc307db9 100644 --- a/app/dashboard/views/setting.py +++ b/app/dashboard/views/setting.py @@ -331,7 +331,7 @@ def send_reset_password_email(user): reset_password_link = f"{URL}/auth/reset_password?code={reset_password_code.code}" - email_utils.send_reset_password_email(user.email, user.name, reset_password_link) + email_utils.send_reset_password_email(user.email, reset_password_link) def send_change_email_confirmation(user: User, email_change: EmailChange): @@ -341,7 +341,7 @@ def send_change_email_confirmation(user: User, email_change: EmailChange): link = f"{URL}/auth/change_email?code={email_change.code}" - email_utils.send_change_email(email_change.new_email, user.email, user.name, link) + email_utils.send_change_email(email_change.new_email, user.email, link) @dashboard_bp.route("/resend_email_change", methods=["GET", "POST"]) diff --git a/app/email_utils.py b/app/email_utils.py index a9a872fc..9af875f1 100644 --- a/app/email_utils.py +++ b/app/email_utils.py @@ -78,9 +78,9 @@ def send_welcome_email(user): send_email( to_email, - f"Welcome to SimpleLogin {user.name}", - render("com/welcome.txt", name=user.name, user=user, alias=alias), - render("com/welcome.html", name=user.name, user=user, alias=alias), + f"Welcome to SimpleLogin", + render("com/welcome.txt", user=user, alias=alias), + render("com/welcome.html", user=user, alias=alias), unsubscribe_link, via_email, ) @@ -89,62 +89,56 @@ def send_welcome_email(user): def send_trial_end_soon_email(user): send_email( user.email, - f"Your trial will end soon {user.name}", - render("transactional/trial-end.txt", name=user.name, user=user), - render("transactional/trial-end.html", name=user.name, user=user), + f"Your trial will end soon", + render("transactional/trial-end.txt", user=user), + render("transactional/trial-end.html", user=user), ) -def send_activation_email(email, name, activation_link): +def send_activation_email(email, activation_link): send_email( email, - f"Just one more step to join SimpleLogin {name}", + f"Just one more step to join SimpleLogin", render( "transactional/activation.txt", - name=name, activation_link=activation_link, email=email, ), render( "transactional/activation.html", - name=name, activation_link=activation_link, email=email, ), ) -def send_reset_password_email(email, name, reset_password_link): +def send_reset_password_email(email, reset_password_link): send_email( email, "Reset your password on SimpleLogin", render( "transactional/reset-password.txt", - name=name, reset_password_link=reset_password_link, ), render( "transactional/reset-password.html", - name=name, reset_password_link=reset_password_link, ), ) -def send_change_email(new_email, current_email, name, link): +def send_change_email(new_email, current_email, link): send_email( new_email, "Confirm email update on SimpleLogin", render( "transactional/change-email.txt", - name=name, link=link, new_email=new_email, current_email=current_email, ), render( "transactional/change-email.html", - name=name, link=link, new_email=new_email, current_email=current_email, @@ -170,13 +164,11 @@ def send_cannot_create_directory_alias(user, alias_address, directory_name): f"Alias {alias_address} cannot be created", render( "transactional/cannot-create-alias-directory.txt", - name=user.name, alias=alias_address, directory=directory_name, ), render( "transactional/cannot-create-alias-directory.html", - name=user.name, alias=alias_address, directory=directory_name, ), @@ -194,13 +186,11 @@ def send_cannot_create_directory_alias_disabled(user, alias_address, directory_n f"Alias {alias_address} cannot be created", render( "transactional/cannot-create-alias-directory-disabled.txt", - name=user.name, alias=alias_address, directory=directory_name, ), render( "transactional/cannot-create-alias-directory-disabled.html", - name=user.name, alias=alias_address, directory=directory_name, ), @@ -216,13 +206,11 @@ def send_cannot_create_domain_alias(user, alias, domain): f"Alias {alias} cannot be created", render( "transactional/cannot-create-alias-domain.txt", - name=user.name, alias=alias, domain=domain, ), render( "transactional/cannot-create-alias-domain.html", - name=user.name, alias=alias, domain=domain, ), diff --git a/app/models.py b/app/models.py index c7157443..2a4727f0 100644 --- a/app/models.py +++ b/app/models.py @@ -1182,9 +1182,9 @@ class ClientUser(db.Model, ModelMixin): for scope in self.client.get_scopes(): if scope == Scope.NAME: if self.name: - res[Scope.NAME.value] = self.name + res[Scope.NAME.value] = self.name or "" else: - res[Scope.NAME.value] = self.user.name + res[Scope.NAME.value] = self.user.name or "" elif scope == Scope.AVATAR_URL: if self.user.profile_picture_id: if self.default_avatar: diff --git a/cron.py b/cron.py index 3e37c035..8ed5813f 100644 --- a/cron.py +++ b/cron.py @@ -88,7 +88,7 @@ def notify_premium_end(): send_email( user.email, - f"Your subscription will end soon {user.name}", + f"Your subscription will end soon", render( "transactional/subscription-end.txt", user=user, @@ -115,16 +115,14 @@ def notify_manual_sub_end(): LOG.debug("Remind user %s that their manual sub is ending soon", user) send_email( user.email, - f"Your subscription will end soon {user.name}", + f"Your subscription will end soon", render( "transactional/manual-subscription-end.txt", - name=user.name, user=user, manual_sub=manual_sub, ), render( "transactional/manual-subscription-end.html", - name=user.name, user=user, manual_sub=manual_sub, ), @@ -498,13 +496,11 @@ def check_custom_domain(): render( "transactional/custom-domain-dns-issue.txt", custom_domain=custom_domain, - name=user.name or "", domain_dns_url=domain_dns_url, ), render( "transactional/custom-domain-dns-issue.html", custom_domain=custom_domain, - name=user.name or "", domain_dns_url=domain_dns_url, ), max_nb_alert=1, diff --git a/email_handler.py b/email_handler.py index 630e24c3..cf157159 100644 --- a/email_handler.py +++ b/email_handler.py @@ -447,14 +447,12 @@ def handle_email_sent_to_ourself(alias, mailbox, msg: Message, user): f"Email sent to {alias.email} from its own mailbox {mailbox.email}", render( "transactional/cycle-email.txt", - name=user.name or "", alias=alias, mailbox=mailbox, refused_email_url=refused_email_url, ), render( "transactional/cycle-email.html", - name=user.name or "", alias=alias, mailbox=mailbox, refused_email_url=refused_email_url, @@ -569,14 +567,12 @@ def forward_email_to_mailbox( f"Your mailbox {mailbox.email} and alias {alias.email} use the same domain", render( "transactional/mailbox-invalid.txt", - name=user.name or "", mailbox=mailbox, mailbox_url=mailbox_url, alias=alias, ), render( "transactional/mailbox-invalid.html", - name=user.name or "", mailbox=mailbox, mailbox_url=mailbox_url, alias=alias, @@ -1037,7 +1033,6 @@ def spf_pass( f"SimpleLogin Alert: attempt to send emails from your alias {alias.email} from unknown IP Address", render( "transactional/spf-fail.txt", - name=user.name, alias=alias.email, ip=ip, mailbox_url=URL + f"/dashboard/mailbox/{mailbox.id}#spf", @@ -1047,8 +1042,6 @@ def spf_pass( ), render( "transactional/spf-fail.html", - name=user.name, - alias=alias.email, ip=ip, mailbox_url=URL + f"/dashboard/mailbox/{mailbox.id}#spf", to_email=contact_email, @@ -1094,7 +1087,6 @@ def handle_unknown_mailbox( f"Attempt to use your alias {alias.email} from {envelope.mail_from}", render( "transactional/reply-must-use-personal-email.txt", - name=user.name, alias=alias, sender=envelope.mail_from, authorize_address_link=authorize_address_link, @@ -1102,7 +1094,6 @@ def handle_unknown_mailbox( ), render( "transactional/reply-must-use-personal-email.html", - name=user.name, alias=alias, sender=envelope.mail_from, authorize_address_link=authorize_address_link, @@ -1409,7 +1400,6 @@ def handle_spam( f"Email from {alias.email} to {contact.website_email} is detected as spam", render( "transactional/spam-email-reply-phase.txt", - name=user.name, alias=alias, website_email=contact.website_email, disable_alias_link=disable_alias_link, @@ -1417,7 +1407,6 @@ def handle_spam( ), render( "transactional/spam-email-reply-phase.html", - name=user.name, alias=alias, website_email=contact.website_email, disable_alias_link=disable_alias_link, @@ -1440,7 +1429,6 @@ def handle_spam( f"Email from {contact.website_email} to {alias.email} is detected as spam", render( "transactional/spam-email.txt", - name=user.name, alias=alias, website_email=contact.website_email, disable_alias_link=disable_alias_link, @@ -1448,7 +1436,6 @@ def handle_spam( ), render( "transactional/spam-email.html", - name=user.name, alias=alias, website_email=contact.website_email, disable_alias_link=disable_alias_link, diff --git a/server.py b/server.py index 73bed1fb..8364ca6e 100644 --- a/server.py +++ b/server.py @@ -604,7 +604,6 @@ def setup_paddle_callback(app: Flask): "SimpleLogin - what can we do to improve the product?", render( "transactional/subscription-cancel.txt", - name=user.name or "", end_date=request.form.get("cancellation_effective_date"), ), ) diff --git a/templates/emails/com/welcome.html b/templates/emails/com/welcome.html index 35672196..9db5a117 100644 --- a/templates/emails/com/welcome.html +++ b/templates/emails/com/welcome.html @@ -2,11 +2,7 @@ {% block greeting %}

- {% if name %} - Welcome, {{ name }}! - {% else %} - Welcome! - {% endif %} + Welcome!

{% endblock %} diff --git a/templates/emails/com/welcome.txt b/templates/emails/com/welcome.txt index e3090472..0e9fe3e5 100644 --- a/templates/emails/com/welcome.txt +++ b/templates/emails/com/welcome.txt @@ -1,4 +1,4 @@ -Hi {{name}} +Hi! {% if alias %} This is the first email you receive via your first alias {{ alias }}. diff --git a/templates/emails/transactional/activation.html b/templates/emails/transactional/activation.html index a4f8ed75..2866cfaf 100644 --- a/templates/emails/transactional/activation.html +++ b/templates/emails/transactional/activation.html @@ -1,7 +1,6 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} {{ render_text("Thank you for choosing SimpleLogin.") }} {{ render_text("To get started, please confirm that " + email + " is your email address by clicking on the button below within 1 hour.") }} {{ render_button("Verify email", activation_link) }} diff --git a/templates/emails/transactional/activation.txt b/templates/emails/transactional/activation.txt index 13ea956b..ca683580 100644 --- a/templates/emails/transactional/activation.txt +++ b/templates/emails/transactional/activation.txt @@ -1,5 +1,3 @@ -Hi {{name}} - Thank you for choosing SimpleLogin. To get started, please confirm that {{email}} is your email address using this link {{activation_link}} within 1 hour. diff --git a/templates/emails/transactional/cannot-create-alias-directory-disabled.html b/templates/emails/transactional/cannot-create-alias-directory-disabled.html index c30b70fe..30b94ad0 100644 --- a/templates/emails/transactional/cannot-create-alias-directory-disabled.html +++ b/templates/emails/transactional/cannot-create-alias-directory-disabled.html @@ -1,7 +1,11 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} + {% call text() %} +

+ Cannot create {{ alias }} on-the-fly +

+ {% endcall %} {% call text() %} An email has been sent to the alias {{ alias }} that would be created automatically as you own the directory {{ directory }} diff --git a/templates/emails/transactional/cannot-create-alias-directory-disabled.txt b/templates/emails/transactional/cannot-create-alias-directory-disabled.txt index 852ca610..4702c6d7 100644 --- a/templates/emails/transactional/cannot-create-alias-directory-disabled.txt +++ b/templates/emails/transactional/cannot-create-alias-directory-disabled.txt @@ -1,5 +1,3 @@ -Hi {{name}} - An email has been sent to the alias {{alias}} that would be created automatically as you own the directory {{directory}}. As the directory has the on-the-fly alias creation disabled, the alias isn't created. diff --git a/templates/emails/transactional/cannot-create-alias-directory.html b/templates/emails/transactional/cannot-create-alias-directory.html index d7f498c7..3143f108 100644 --- a/templates/emails/transactional/cannot-create-alias-directory.html +++ b/templates/emails/transactional/cannot-create-alias-directory.html @@ -1,7 +1,12 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} + {% call text() %} +

+ Cannot create alias {{ alias }} on-the-fly +

+ {% endcall %} + {{ render_text("An email has been sent to the alias " + alias + " that would be created automatically as you own the directory " + directory + ".") }} {{ render_text("However as your plan is no longer premium, this creation cannot happen.") }} diff --git a/templates/emails/transactional/cannot-create-alias-directory.txt b/templates/emails/transactional/cannot-create-alias-directory.txt index 25641494..1d7e6169 100644 --- a/templates/emails/transactional/cannot-create-alias-directory.txt +++ b/templates/emails/transactional/cannot-create-alias-directory.txt @@ -1,5 +1,3 @@ -Hi {{name}} - An email has been sent to the alias {{alias}} that would be created automatically as you own the directory {{directory}}. However as your plan is no longer premium, this creation cannot happen. Please upgrade to premium plan in order to use this feature. diff --git a/templates/emails/transactional/cannot-create-alias-domain.html b/templates/emails/transactional/cannot-create-alias-domain.html index f5f274c2..d4d02eef 100644 --- a/templates/emails/transactional/cannot-create-alias-domain.html +++ b/templates/emails/transactional/cannot-create-alias-domain.html @@ -1,7 +1,12 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} + {% call text() %} +

+ Cannot create {{ alias }} on-the-fly +

+ {% endcall %} + {{ render_text("An email has been sent to the alias " + alias + " that would be created automatically as you own the domain " + domain + ".") }} {{ render_text("However as your plan is no longer premium, this creation cannot happen.") }} diff --git a/templates/emails/transactional/cannot-create-alias-domain.txt b/templates/emails/transactional/cannot-create-alias-domain.txt index 300a327f..47d5e0fd 100644 --- a/templates/emails/transactional/cannot-create-alias-domain.txt +++ b/templates/emails/transactional/cannot-create-alias-domain.txt @@ -1,5 +1,3 @@ -Hi {{name}} - An email has been sent to the alias {{alias}} that would be created automatically as you own the domain {{domain}}. However as your plan is no longer premium, this creation cannot happen. Please upgrade to premium plan in order to use this feature. diff --git a/templates/emails/transactional/change-email.html b/templates/emails/transactional/change-email.html index 0a57c050..90d13c65 100644 --- a/templates/emails/transactional/change-email.html +++ b/templates/emails/transactional/change-email.html @@ -1,7 +1,6 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} {{ render_text("You recently requested to change your email on SimpleLogin to "+ new_email +".") }} {{ render_text("Your current email is " + current_email + ".") }} {{ render_text("Use the button below to confirm within the next 12 hours.") }} diff --git a/templates/emails/transactional/change-email.txt b/templates/emails/transactional/change-email.txt index ad63b114..46ebe36e 100644 --- a/templates/emails/transactional/change-email.txt +++ b/templates/emails/transactional/change-email.txt @@ -1,5 +1,3 @@ -Hi {{name}} - You have asked to change your email to {{new_email}}. Your current email is {{current_email}}. diff --git a/templates/emails/transactional/custom-domain-dns-issue.html b/templates/emails/transactional/custom-domain-dns-issue.html index dea74d34..42a167e3 100644 --- a/templates/emails/transactional/custom-domain-dns-issue.html +++ b/templates/emails/transactional/custom-domain-dns-issue.html @@ -1,10 +1,10 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} - {% call text() %} - We have detected that your domain {{ custom_domain.domain }} does not have the DNS set up correctly. +

+ {{ custom_domain.domain }} does not have the DNS set up correctly +

{% endcall %} {% call text() %} diff --git a/templates/emails/transactional/custom-domain-dns-issue.txt b/templates/emails/transactional/custom-domain-dns-issue.txt index 6379a302..ef0988fa 100644 --- a/templates/emails/transactional/custom-domain-dns-issue.txt +++ b/templates/emails/transactional/custom-domain-dns-issue.txt @@ -1,5 +1,3 @@ -Hi {{name}} - We have detected that your domain {{ custom_domain.domain }} does not have the DNS set up correctly. Please make sure to set up your domain following the instructions on your domain DNS page at: diff --git a/templates/emails/transactional/cycle-email.html b/templates/emails/transactional/cycle-email.html index 0ed27132..0995540b 100644 --- a/templates/emails/transactional/cycle-email.html +++ b/templates/emails/transactional/cycle-email.html @@ -2,12 +2,10 @@ {% block content %} {% call text() %} - Hi {{ name }} - {% endcall %} - - {% call text() %} - An email was sent to your alias {{ alias.email }} from its own mailbox - {{ mailbox.email }}. +

+ An email was sent to your alias {{ alias.email }} from its own mailbox + {{ mailbox.email }}. +

{% endcall %} {% call text() %} diff --git a/templates/emails/transactional/cycle-email.txt b/templates/emails/transactional/cycle-email.txt index 85c0c5df..615e73ca 100644 --- a/templates/emails/transactional/cycle-email.txt +++ b/templates/emails/transactional/cycle-email.txt @@ -1,5 +1,3 @@ -Hi {{name}} - An email was sent to your alias {{ alias.email }} from its own mailbox {{ mailbox.email }}. SimpleLogin doesn't send this email back to your mailbox as it would be refused or hidden anyway by your email service. diff --git a/templates/emails/transactional/mailbox-invalid.txt b/templates/emails/transactional/mailbox-invalid.txt index 523e16fd..c9c486dd 100644 --- a/templates/emails/transactional/mailbox-invalid.txt +++ b/templates/emails/transactional/mailbox-invalid.txt @@ -1,6 +1,4 @@ -Hi {{name}} - -Your mailbox {{ mailbox.email }} and alias {{alias.email}} cannot use the same domain. +Your mailbox {{ mailbox.email }} and alias {{alias.email}} cannot have the same domain. The alias domain should point to SimpleLogin servers so emails sent to it are forwarded by SimpleLogin. diff --git a/templates/emails/transactional/manual-subscription-end.txt b/templates/emails/transactional/manual-subscription-end.txt index 0f3f9d2f..d35fbf7b 100644 --- a/templates/emails/transactional/manual-subscription-end.txt +++ b/templates/emails/transactional/manual-subscription-end.txt @@ -1,5 +1,3 @@ -Hi {{name}} - Your subscription will end on {{ manual_sub.end_at.format("YYYY-MM-DD") }} Please contact us at hi@simplelogin.io to renew your subscription. diff --git a/templates/emails/transactional/reply-must-use-personal-email.html b/templates/emails/transactional/reply-must-use-personal-email.html index a371a913..0daf5f9b 100644 --- a/templates/emails/transactional/reply-must-use-personal-email.html +++ b/templates/emails/transactional/reply-must-use-personal-email.html @@ -1,7 +1,11 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} + {% call text() %} +

+ An attempt to send an email from your alias {{ alias.email }} using {{ sender }} is blocked. +

+ {% endcall %} {% call text() %} As a measure to protect against email spoofing, we have blocked an attempt to send an email from your alias {{ alias.email }} using {{ sender }}. diff --git a/templates/emails/transactional/reply-must-use-personal-email.txt b/templates/emails/transactional/reply-must-use-personal-email.txt index bd863c94..85e804c5 100644 --- a/templates/emails/transactional/reply-must-use-personal-email.txt +++ b/templates/emails/transactional/reply-must-use-personal-email.txt @@ -1,5 +1,3 @@ -Hi {{name}} - We have recorded an attempt to send an email from your alias {{ alias.email }} using {{ sender }}. Please note that sending from this alias only works from alias's owning mailboxes, that are diff --git a/templates/emails/transactional/reset-password.html b/templates/emails/transactional/reset-password.html index 8b2a53f5..6e1b04c5 100644 --- a/templates/emails/transactional/reset-password.html +++ b/templates/emails/transactional/reset-password.html @@ -1,7 +1,6 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} {{ render_text("You recently requested to reset your password on SimpleLogin.") }} {{ render_text("Use the button below to reset it. This password reset is only valid for the next hour.") }} {{ render_button("Reset your password", reset_password_link) }} diff --git a/templates/emails/transactional/reset-password.txt b/templates/emails/transactional/reset-password.txt index f6cf19d3..27a1eef0 100644 --- a/templates/emails/transactional/reset-password.txt +++ b/templates/emails/transactional/reset-password.txt @@ -1,5 +1,3 @@ -Hi {{name}} - To reset or change your password, please click on this link: {{reset_password_link}} diff --git a/templates/emails/transactional/spam-email-reply-phase.html b/templates/emails/transactional/spam-email-reply-phase.html index 3ec3c76c..7bdeb494 100644 --- a/templates/emails/transactional/spam-email-reply-phase.html +++ b/templates/emails/transactional/spam-email-reply-phase.html @@ -1,16 +1,29 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} - {{ render_text("An email sent from your alias " + alias.email + " to " + website_email + " is detected as spam by our Spam Detection Engine (SpamAssassin).") }} + {% call text() %} +

+ An email sent from your alias {{ alias.email }} to {{ website_email }} is detected as spam. +

+ {% endcall %} - {{ render_text('In most of the cases, the email will be refused by your contact.') }} + {% call text() %} + An email sent from your alias {{ alias.email }} to {{ website_email }} is detected as spam by our Spam Detection Engine (SpamAssassin). + {% endcall %} + + {% call text() %} + In most of the cases, the email will be refused by your contact. + {% endcall %} {{ render_button("View the email", refused_email_url) }} - {{ render_text('The email is automatically deleted in 7 days.') }} + {% call text() %} + The email is automatically deleted in 7 days. + {% endcall %} - {{ render_text('Please let us know if you have any question by replying to this email.') }} + {% call text() %} + Please let us know if you have any question by replying to this email. + {% endcall %} {{ render_text('Thanks,
SimpleLogin Team.') }} {{ raw_url(disable_alias_link) }} diff --git a/templates/emails/transactional/spam-email-reply-phase.txt b/templates/emails/transactional/spam-email-reply-phase.txt index 792db3f9..df0d2710 100644 --- a/templates/emails/transactional/spam-email-reply-phase.txt +++ b/templates/emails/transactional/spam-email-reply-phase.txt @@ -1,5 +1,3 @@ -Hi {{name}} - An email sent from your alias {{alias.email}} to {{website_email}} is detected as spam by our Spam Detection Engine (SpamAssassin). In most of the cases, the email will be refused by your contact. diff --git a/templates/emails/transactional/spam-email.html b/templates/emails/transactional/spam-email.html index 9bc2cf3b..a722a15e 100644 --- a/templates/emails/transactional/spam-email.html +++ b/templates/emails/transactional/spam-email.html @@ -1,16 +1,29 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} - {{ render_text("An email sent to your alias " + alias.email + " from " + website_email + " is detected as spam by our Spam Detection Engine (SpamAssassin).") }} + {% call text() %} +

+ An email sent to your alias {{ alias.email }} from {{ website_email }} is detected as spam +

+ {% endcall %} - {{ render_text('In most of the cases, the email will be refused by your email provider.') }} + {% call text() %} + An email sent to your alias {{ alias.email }} from {{ website_email }} is detected as spam by our Spam Detection Engine (SpamAssassin). + {% endcall %} + + {% call text() %} + In most of the cases, the email will be refused by your email provider. + {% endcall %} {{ render_button("View the email", refused_email_url) }} - {{ render_text('The email is automatically deleted in 7 days.') }} + {% call text() %} + The email is automatically deleted in 7 days. + {% endcall %} - {{ render_text('Your alias ' + alias.email + ' is probably in the hands of a spammer now. In this case, you should disable or delete the alias immediately.') }} + {% call text() %} + Your alias {{ alias.email }} is probably in the hands of a spammer now. In this case, you should disable or delete the alias immediately. + {% endcall %} {{ render_button("Disable alias", disable_alias_link) }} diff --git a/templates/emails/transactional/spam-email.txt b/templates/emails/transactional/spam-email.txt index a797aee9..2d883b16 100644 --- a/templates/emails/transactional/spam-email.txt +++ b/templates/emails/transactional/spam-email.txt @@ -1,5 +1,3 @@ -Hi {{name}} - An email sent to your alias {{alias.email}} from {{website_email}} is detected as spam by our Spam Detection Engine (SpamAssassin). In most of the cases, the email will be refused by your email provider. diff --git a/templates/emails/transactional/spf-fail.html b/templates/emails/transactional/spf-fail.html index 13558c58..161dafb9 100644 --- a/templates/emails/transactional/spf-fail.html +++ b/templates/emails/transactional/spf-fail.html @@ -1,7 +1,11 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} + {% call text() %} +

+ Attempt to send an email from your alias {{ alias }} from an unknown IP address +

+ {% endcall %} {% call text() %} We have recorded an attempt to send the following email from your alias {{ alias }} from an unknown IP diff --git a/templates/emails/transactional/spf-fail.txt b/templates/emails/transactional/spf-fail.txt index 5cee2e6d..7fbef21e 100644 --- a/templates/emails/transactional/spf-fail.txt +++ b/templates/emails/transactional/spf-fail.txt @@ -1,5 +1,3 @@ -Hi {{name}} - We have recorded an attempt to send the following email from your alias {{ alias }} from an unknown IP address {{ ip }}. - From: {{alias}} diff --git a/templates/emails/transactional/subscription-cancel.txt b/templates/emails/transactional/subscription-cancel.txt index 1c0e6cb1..0c28cb16 100644 --- a/templates/emails/transactional/subscription-cancel.txt +++ b/templates/emails/transactional/subscription-cancel.txt @@ -1,4 +1,4 @@ -Hi {{name}} +Hi, This is Son, SimpleLogin founder. I saw that you have canceled your subscription. diff --git a/templates/emails/transactional/trial-end.html b/templates/emails/transactional/trial-end.html index ed7eacd6..e806745c 100644 --- a/templates/emails/transactional/trial-end.html +++ b/templates/emails/transactional/trial-end.html @@ -1,13 +1,12 @@ {% extends "base.html" %} {% block content %} - {% if name %} - {{ render_text("Hi " + name + ",") }} - {% else %} - {{ render_text("Hi,") }} - {% endif %} - {{ render_text("Your trial will end " + user.trial_end.humanize() + ".") }} + {% call text() %} +

+ Your trial will end {{ user.trial_end.humanize() }} +

+ {% endcall %} {{ render_text("When the trial ends:") }} diff --git a/templates/emails/transactional/trial-end.txt b/templates/emails/transactional/trial-end.txt index c01a7eba..91bf0ccd 100644 --- a/templates/emails/transactional/trial-end.txt +++ b/templates/emails/transactional/trial-end.txt @@ -1,5 +1,3 @@ -Hi {{name}} - Your trial will end {{ user.trial_end.humanize() }}. When the trial ends: