From 8517e7d35673b8b5ad3b0a1cf28c868b506875be Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Wed, 30 Sep 2020 11:51:08 +0200 Subject: [PATCH] refactor com emails: remove non-uses, move to the right location --- app/email_utils.py | 9 --------- shell.py | 10 ---------- templates/emails/com/new-app.html | 11 ----------- templates/emails/com/new-app.txt | 10 ---------- .../emails/com/{ => newsletter}/safari-extension.html | 0 .../emails/com/{ => newsletter}/safari-extension.txt | 0 6 files changed, 40 deletions(-) delete mode 100644 templates/emails/com/new-app.html delete mode 100644 templates/emails/com/new-app.txt rename templates/emails/com/{ => newsletter}/safari-extension.html (100%) rename templates/emails/com/{ => newsletter}/safari-extension.txt (100%) diff --git a/app/email_utils.py b/app/email_utils.py index 45d56ff8..07cc37f3 100644 --- a/app/email_utils.py +++ b/app/email_utils.py @@ -135,15 +135,6 @@ def send_change_email(new_email, current_email, name, link): ) -def send_new_app_email(email, name): - send_email( - email, - f"Any question/feedback for SimpleLogin {name}?", - render("com/new-app.txt", name=name), - render("com/new-app.html", name=name), - ) - - def send_test_email_alias(email, name): send_email( email, diff --git a/shell.py b/shell.py index a4343320..a0f85ef9 100644 --- a/shell.py +++ b/shell.py @@ -41,16 +41,6 @@ def reset_db(): create_db() -def send_safari_extension_newsletter(): - for user in User.query.all(): - send_email( - user.email, - "Quickly create alias with our Safari extension", - render("com/safari-extension.txt", user=user), - render("com/safari-extension.html", user=user), - ) - - def send_mailbox_newsletter(): for user in User.query.order_by(User.id).all(): if user.notification and user.activated: diff --git a/templates/emails/com/new-app.html b/templates/emails/com/new-app.html deleted file mode 100644 index 15f5326e..00000000 --- a/templates/emails/com/new-app.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} - -{% block content %} - {{ render_text("Hi " + name) }} - {{ render_text("This is Son, SimpleLogin founder.") }} - {{ render_text("Even though I lead the company, Iā€™m the *product person* and the user experience you get from our product means a lot to me.") }} - {{ render_text('Our users and developers love SimpleLogin and its simplicity (hence the "simple" in the name), but if there\'s anything that\'s bugging you, even the smallest of issues that could be done better, I want to hear about it - so hit the reply button.') }} - {{ render_button("SimpleLogin documentation", "https://docs.simplelogin.io") }} - {{ render_text('Thanks,
SimpleLogin Team.') }} -{% endblock %} - diff --git a/templates/emails/com/new-app.txt b/templates/emails/com/new-app.txt deleted file mode 100644 index af63f92f..00000000 --- a/templates/emails/com/new-app.txt +++ /dev/null @@ -1,10 +0,0 @@ -Hi {{name}} - -This is Son, SimpleLogin Founder šŸ˜Š. - -Even though I lead the company, Iā€™m the "product person" and the user experience you get from our product means a lot to me. - -Our users and developers love SimpleLogin and its simplicity (hence the "simple" in the name šŸ˜‰), but if there's anything that's bugging you, even the smallest of issues that could be done better, I want to hear about it - so hit the reply button. - -Thanks! -SimpleLogin Team. diff --git a/templates/emails/com/safari-extension.html b/templates/emails/com/newsletter/safari-extension.html similarity index 100% rename from templates/emails/com/safari-extension.html rename to templates/emails/com/newsletter/safari-extension.html diff --git a/templates/emails/com/safari-extension.txt b/templates/emails/com/newsletter/safari-extension.txt similarity index 100% rename from templates/emails/com/safari-extension.txt rename to templates/emails/com/newsletter/safari-extension.txt