diff --git a/app/email_utils.py b/app/email_utils.py index 0fecdfb5..7f21ccb6 100644 --- a/app/email_utils.py +++ b/app/email_utils.py @@ -49,6 +49,27 @@ def send_reset_password_email(email, name, reset_password_link): ) +def send_change_email(new_email, current_email, name, link): + send_by_postfix( + new_email, + f"{name}, confirm email update on SimpleLogin", + _render( + "change-email.txt", + name=name, + link=link, + new_email=new_email, + current_email=current_email, + ), + _render( + "change-email.html", + name=name, + link=link, + new_email=new_email, + current_email=current_email, + ), + ) + + def send_new_app_email(email, name): send_by_postfix( email, diff --git a/templates/emails/change-email.html b/templates/emails/change-email.html new file mode 100644 index 00000000..852cebfa --- /dev/null +++ b/templates/emails/change-email.html @@ -0,0 +1,252 @@ + + + + + + + + + + + + SimpleLogin | Change email + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + Logo + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Hi {{name}}, +
+ You have asked to change your email to {{new_email}}. +

+ Your current email is {{current_email}}. +

+ To confirm, please click on this link: +
+
+ Confirm email change + +
+
+ Or you can paste this link into your browser:

+ {{ link }} +
+ Thanks.
+ Son - SimpleLogin founder. +

+
+ Have a question? son@simplelogin.io +
+ + + + + + + + + + + + + + + + + + +
+ + +
+ + + \ No newline at end of file diff --git a/templates/emails/change-email.txt b/templates/emails/change-email.txt new file mode 100644 index 00000000..7ac950f9 --- /dev/null +++ b/templates/emails/change-email.txt @@ -0,0 +1,12 @@ +Hi {{name}}, + +You have asked to change your email to {{new_email}}. + +Your current email is {{current_email}}. + +To confirm, please click on this link: + +{{link}} + +Cheers, +Son - SimpleLogin founder.