From f34ef8781cccf9dc57fd07ea02ed4b7cd9f8da55 Mon Sep 17 00:00:00 2001
From: Son NK <>
Date: Wed, 8 Apr 2020 23:08:34 +0200
Subject: [PATCH] Do not hardcode MAX_NB_EMAIL_FREE_PLAN in email templates
---
.../transactional/manual-subscription-end.html | 13 ++++++++++---
.../transactional/manual-subscription-end.txt | 4 ++--
.../emails/transactional/subscription-end.html | 13 ++++++++++---
.../emails/transactional/subscription-end.txt | 4 ++--
templates/emails/transactional/trial-end.html | 15 +++++++++++----
templates/emails/transactional/trial-end.txt | 4 ++--
6 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/templates/emails/transactional/manual-subscription-end.html b/templates/emails/transactional/manual-subscription-end.html
index f741fd2c..b05a4023 100644
--- a/templates/emails/transactional/manual-subscription-end.html
+++ b/templates/emails/transactional/manual-subscription-end.html
@@ -12,9 +12,16 @@
{{ render_text("When the subscription ends:") }}
{{ render_text("- All aliases/domains/directories you have created are kept and continue working normally.") }}
- {{ render_text("- You cannot create new aliases if you exceed the free plan limit, i.e. have more than 15 aliases.") }}
- {{ render_text("- As features like catch-all or directory allow you to create aliases on-the-fly,
- those aliases cannot be automatically created if you have more than 15 aliases.") }}
+
+ {% call text() %}
+ - You cannot create new aliases if you exceed the free plan limit, i.e. have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
+ {% endcall %}
+
+ {% call text() %}
+ - As features like catch-all or directory allow you to create aliases on-the-fly,
+ those aliases cannot be automatically created if you have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
+ {% endcall %}
+
{{ render_text("- You cannot add new domain or directory.") }}
{{ render_text('You can upgrade today to continue using all these Premium features (and much more coming).') }}
diff --git a/templates/emails/transactional/manual-subscription-end.txt b/templates/emails/transactional/manual-subscription-end.txt
index 4b282347..a9a10cd5 100644
--- a/templates/emails/transactional/manual-subscription-end.txt
+++ b/templates/emails/transactional/manual-subscription-end.txt
@@ -5,9 +5,9 @@ Your subscription will end {{ manual_sub.end_at.humanize() }}.
When the subscription ends:
- All aliases/domains/directories you have created are kept and continue working.
-- You cannot create new aliases if you exceed the free plan limit, i.e. have more than 15 aliases.
+- You cannot create new aliases if you exceed the free plan limit, i.e. have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
- As features like "catch-all" or "directory" allow you to create aliases on-the-fly,
- those aliases cannot be automatically created if you have more than 15 aliases.
+ those aliases cannot be automatically created if you have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
- You cannot add new domain or directory.
You can upgrade today to continue using all these Premium features (and much more coming).
diff --git a/templates/emails/transactional/subscription-end.html b/templates/emails/transactional/subscription-end.html
index 7d101ca8..6d4d5a2b 100644
--- a/templates/emails/transactional/subscription-end.html
+++ b/templates/emails/transactional/subscription-end.html
@@ -12,9 +12,16 @@
{{ render_text("When the subscription ends:") }}
{{ render_text("- All aliases/domains/directories you have created are kept and continue working normally.") }}
- {{ render_text("- You cannot create new aliases if you exceed the free plan limit, i.e. have more than 15 aliases.") }}
- {{ render_text("- As features like catch-all or directory allow you to create aliases on-the-fly,
- those aliases cannot be automatically created if you have more than 15 aliases.") }}
+
+ {% call text() %}
+ - You cannot create new aliases if you exceed the free plan limit, i.e. have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
+ {% endcall %}
+
+ {% call text() %}
+ - As features like catch-all or directory allow you to create aliases on-the-fly,
+ those aliases cannot be automatically created if you have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
+ {% endcall %}
+
{{ render_text("- You cannot add new domain or directory.") }}
{{ render_text('You can upgrade today to continue using all these Premium features (and much more coming).') }}
diff --git a/templates/emails/transactional/subscription-end.txt b/templates/emails/transactional/subscription-end.txt
index e5363bb4..32c6b881 100644
--- a/templates/emails/transactional/subscription-end.txt
+++ b/templates/emails/transactional/subscription-end.txt
@@ -5,9 +5,9 @@ Your subscription will end on {{ user.next_bill_date() }}.
When the subscription ends:
- All aliases/domains/directories you have created are kept and continue working.
-- You cannot create new aliases if you exceed the free plan limit, i.e. have more than 15 aliases.
+- You cannot create new aliases if you exceed the free plan limit, i.e. have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
- As features like "catch-all" or "directory" allow you to create aliases on-the-fly,
- those aliases cannot be automatically created if you have more than 15 aliases.
+ those aliases cannot be automatically created if you have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
- You cannot add new domain or directory.
You can upgrade today to continue using all these Premium features (and much more coming).
diff --git a/templates/emails/transactional/trial-end.html b/templates/emails/transactional/trial-end.html
index cc0dfe0e..63cd300c 100644
--- a/templates/emails/transactional/trial-end.html
+++ b/templates/emails/transactional/trial-end.html
@@ -12,9 +12,16 @@
{{ render_text("When the trial ends:") }}
{{ render_text("- All aliases/domains/directories you have created are kept and continue working normally.") }}
- {{ render_text("- You cannot create new aliases if you exceed the free plan limit, i.e. have more than 15 aliases.") }}
- {{ render_text("- As features like catch-all or directory allow you to create aliases on-the-fly,
- those aliases cannot be automatically created if you have more than 15 aliases.") }}
+
+ {% call text() %}
+ - You cannot create new aliases if you exceed the free plan limit, i.e. have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
+ {% endcall %}
+
+ {% call text() %}
+ - As features like catch-all or directory allow you to create aliases on-the-fly,
+ those aliases cannot be automatically created if you have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
+ {% endcall %}
+
{{ render_text("- You cannot add new domain or directory.") }}
{{ render_text("- You cannot add new mailbox.") }}
{{ render_text("- If you enable PGP Encryption, forwarded emails are not encrypted anymore.") }}
@@ -26,7 +33,7 @@
{{ render_text("If you're not ready to upgrade to a paying account, you have a few other options available to you:") }}
{{ grey_section([
- "Continue with the Free Plan - In the free plan you are limited to 15 aliases but there's no cap on bandwidth or
+ "Continue with the Free Plan - In the free plan you are limited to " ~ MAX_NB_EMAIL_FREE_PLAN ~ " aliases but there's no cap on bandwidth or
number of emails forwarded/sent.",
"Restart your trial - If you didn't get a chance to fully try out the product or need a little more time to evaluate, just let us know. Simply reply to this email and we'll extend your trial period.",
"Share feedback - If SimpleLogin isn't right for you, let us know what you were looking for and we might be able to suggest some alternatives that might be a better fit.",
diff --git a/templates/emails/transactional/trial-end.txt b/templates/emails/transactional/trial-end.txt
index 724a28df..c01a7eba 100644
--- a/templates/emails/transactional/trial-end.txt
+++ b/templates/emails/transactional/trial-end.txt
@@ -5,9 +5,9 @@ Your trial will end {{ user.trial_end.humanize() }}.
When the trial ends:
- All aliases/domains/directories you have created are kept and continue working.
-- You cannot create new aliases if you exceed the free plan limit, i.e. have more than 15 aliases.
+- You cannot create new aliases if you exceed the free plan limit, i.e. have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
- As features like "catch-all" or "directory" allow you to create aliases on-the-fly,
- those aliases cannot be automatically created if you have more than 15 aliases.
+ those aliases cannot be automatically created if you have more than {{MAX_NB_EMAIL_FREE_PLAN}} aliases.
- You cannot add new domain or directory.
- You cannot add new mailbox.
- If you enable PGP Encryption, forwarded emails are not encrypted anymore.