From c6eba9f1258340bf551f5d87b190d1ba38135d96 Mon Sep 17 00:00:00 2001
From: Son NK <>
Date: Sat, 12 Sep 2020 14:34:32 +0200
Subject: [PATCH] improve welcome email
---
app/email_utils.py | 13 ++++++--
templates/emails/com/welcome.html | 52 ++++++++++++++-----------------
2 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/app/email_utils.py b/app/email_utils.py
index e2951f42..5c448b65 100644
--- a/app/email_utils.py
+++ b/app/email_utils.py
@@ -54,11 +54,18 @@ def render(template_name, **kwargs) -> str:
def send_welcome_email(user):
+ to_email = user.get_communication_email()
+ if not to_email:
+ return
+
+ # whether this email is sent to an alias
+ alias = to_email if to_email != user.email else None
+
send_email(
- user.email,
+ to_email,
f"Welcome to SimpleLogin {user.name}",
- render("com/welcome.txt", name=user.name, user=user),
- render("com/welcome.html", name=user.name, user=user),
+ render("com/welcome.txt", name=user.name, user=user, alias=alias),
+ render("com/welcome.html", name=user.name, user=user, alias=alias),
)
diff --git a/templates/emails/com/welcome.html b/templates/emails/com/welcome.html
index b6c5f76a..18f2266a 100644
--- a/templates/emails/com/welcome.html
+++ b/templates/emails/com/welcome.html
@@ -11,49 +11,45 @@
{% endblock %}
{% block content %}
- {% call text() %}
- My name is Son. I’m the founder of SimpleLogin and I wanted to be the first to welcome you on board.
- {% endcall %}
+ {% if alias %}
+ {% call text() %}
+ This is the first email you receive via your first alias {{ alias }}.
+ This alias is automatically created when you signed up on SimpleLogin.
+ {% endcall %}
+
+ {% call text() %}
+ It's for receiving our news, feature announcements or tips -
+ feel free to disable it if you don't need any of
+ these.
+ {% endcall %}
+ {% endif %}
{% call text() %}
- To better secure your account, I recommend enabling Multi-Factor Authentication (MFA) on your
- Setting page.
- {% endcall %}
-
- {% call text() %}
- If you have any feedback or improvement ideas please let me know by simply replying to this email. Yes, this email
- is not sent from a no-reply address.
- {% endcall %}
-
- {% call text() %}
- To be informed of SimpleLogin latest features, you can follow our
- Twitter or join our
- Reddit sub.
+ You can reach out to us by:
+ - Simply replying to this email
+ - On Twitter
+ - On Reddit
{% endcall %}
{% if user.in_trial() and user.trial_end %}
{% call text() %}
- You can use all premium features like custom domain or alias directory during the
- trial period. Your trial will end {{user.trial_end.humanize() }}.
- All aliases you create during the trial
- will continue to work normally when the trial ends.
+ When you signed up, you can use all premium features like custom domain, alias directory,
+ mailbox,
+ PGP without any limit during 7 days (the "trial period").
+ No worries: all aliases you create during this period
+ will continue to work normally even if you don't upgrade.
{% endcall %}
-
{% endif %}
{% call text() %}
- In the next coming days, you are going to receive some onboarding emails to quickly present some SimpleLogin
- features.
- If you don't want to receive these emails, you can disable them in your
- notification settings.
+ Please don't hesitate to talk around you about the benefits of using email alias
+ to protect your personal email address and your privacy.
{% endcall %}
{% call text() %}
- Thanks,
+ Let's make spammers and Big Tech's life harder.
SimpleLogin Team.
{% endcall %}
-
-
{% endblock %}