diff --git a/app/config.py b/app/config.py
index a92fb17c..e399aa1c 100644
--- a/app/config.py
+++ b/app/config.py
@@ -199,6 +199,7 @@ FLASK_PROFILER_PASSWORD = os.environ.get("FLASK_PROFILER_PASSWORD")
JOB_ONBOARDING_1 = "onboarding-1"
JOB_ONBOARDING_2 = "onboarding-2"
JOB_ONBOARDING_3 = "onboarding-3"
+JOB_ONBOARDING_4 = "onboarding-4"
# for pagination
PAGE_LIMIT = 20
diff --git a/app/models.py b/app/models.py
index 8186771f..5d140547 100644
--- a/app/models.py
+++ b/app/models.py
@@ -19,6 +19,7 @@ from app.config import (
JOB_ONBOARDING_1,
JOB_ONBOARDING_2,
JOB_ONBOARDING_3,
+ JOB_ONBOARDING_4,
)
from app.extensions import db
from app.log import LOG
@@ -187,6 +188,11 @@ class User(db.Model, ModelMixin, UserMixin):
payload={"user_id": user.id},
run_at=arrow.now().shift(days=3),
)
+ Job.create(
+ name=JOB_ONBOARDING_4,
+ payload={"user_id": user.id},
+ run_at=arrow.now().shift(days=4),
+ )
db.session.flush()
return user
diff --git a/job_runner.py b/job_runner.py
index a369cf87..b6971b59 100644
--- a/job_runner.py
+++ b/job_runner.py
@@ -6,7 +6,12 @@ import time
import arrow
-from app.config import JOB_ONBOARDING_1, JOB_ONBOARDING_2, JOB_ONBOARDING_3
+from app.config import (
+ JOB_ONBOARDING_1,
+ JOB_ONBOARDING_2,
+ JOB_ONBOARDING_3,
+ JOB_ONBOARDING_4,
+)
from app.email_utils import send_email, render
from app.extensions import db
from app.log import LOG
@@ -48,6 +53,15 @@ def onboarding_pgp(user):
)
+def onboarding_browser_extension(user):
+ send_email(
+ user.email,
+ f"Do you know you can create aliases without leaving the browser?",
+ render("com/onboarding/browser-extension.txt", user=user),
+ render("com/onboarding/browser-extension.html", user=user),
+ )
+
+
def onboarding_mailbox(user):
send_email(
user.email,
@@ -103,6 +117,18 @@ if __name__ == "__main__":
LOG.d("send onboarding pgp email to user %s", user)
onboarding_pgp(user)
+ elif job.name == JOB_ONBOARDING_4:
+ user_id = job.payload.get("user_id")
+ user = User.get(user_id)
+
+ # user might delete their account in the meantime
+ # or disable the notification
+ if user and user.notification and user.activated:
+ LOG.d(
+ "send onboarding browser-extension email to user %s", user
+ )
+ onboarding_browser_extension(user)
+
else:
LOG.error("Unknown job name %s", job.name)
diff --git a/templates/emails/com/onboarding/browser-extension.html b/templates/emails/com/onboarding/browser-extension.html
new file mode 100644
index 00000000..d02aaf64
--- /dev/null
+++ b/templates/emails/com/onboarding/browser-extension.html
@@ -0,0 +1,22 @@
+{% extends "base.html" %}
+
+{% block content %}
+ {{ render_text("Hi " + user.name) }}
+
+ {{ render_text('If you want to quickly create aliases without going to SimpleLogin website, you can do that with SimpleLogin Chrome (or other Chromium-based browsers like Brave or Vivaldi), Firefox and Safari extension.
+') }}
+
+ {{ render_text("The Android and iOS apps are also coming. To try out our iOS beta version, please reply to this email so we can invite you our TestFlight program.
+") }}
+
+ {{ render_text('Thanks,
SimpleLogin Team.') }}
+ {{ render_text('P.S. Need immediate help getting started? Just reply to this email, the SimpleLogin support team is always ready to help!.') }}
+
+
+{% endblock %}
+
+{% block footer %}
+ This email is sent to {{ user.email }} and is part of our onboarding series. Unsubscribe on
+ Settings
+{% endblock %}
diff --git a/templates/emails/com/onboarding/browser-extension.txt b/templates/emails/com/onboarding/browser-extension.txt
new file mode 100644
index 00000000..e8f9bea9
--- /dev/null
+++ b/templates/emails/com/onboarding/browser-extension.txt
@@ -0,0 +1,22 @@
+This email is sent to {{ user.email }} and is part of our onboarding series.
+Unsubscribe from our emails on https://app.simplelogin.io/dashboard/setting#notification
+----------------
+
+Hi {{user.name}}
+
+If you want to quickly create aliases without going to SimpleLogin website, you can do that with SimpleLogin Chrome (or other Chromium-based browsers like Brave or Vivaldi), Firefox and Safari extension.
+
+Chrome: https://chrome.google.com/webstore/detail/simplelogin-your-anti-spa/dphilobhebphkdjbpfohgikllaljmgbn
+
+Firefox: https://addons.mozilla.org/en-GB/firefox/addon/simplelogin/
+
+Safari: https://apps.apple.com/us/app/simplelogin/id1494051017?mt=12&fbclid=IwAR0M0nnEKgoieMkmx91TSXrtcScj7GouqRxGgXeJz2un_5ydhIKlbAI79Io
+
+The Android and iOS apps are also coming.
+
+To try out our iOS beta version, please reply to this email so we can invite you our TestFlight program.
+
+As usual, let us know if you have any question by replying to this email.
+
+Best regards,
+SimpleLogin team.
\ No newline at end of file