From 731d898774a7457cb4a824ff926ff651346daf27 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 23 Feb 2020 14:08:55 +0700 Subject: [PATCH] Handle mailbox change --- app/dashboard/__init__.py | 1 + .../templates/dashboard/mailbox.html | 14 +- .../templates/dashboard/mailbox_detail.html | 58 +++++++ app/dashboard/views/mailbox_detail.py | 150 ++++++++++++++++++ .../transactional/verify-mailbox-change.html | 11 ++ .../transactional/verify-mailbox-change.txt | 10 ++ 6 files changed, 239 insertions(+), 5 deletions(-) create mode 100644 app/dashboard/templates/dashboard/mailbox_detail.html create mode 100644 app/dashboard/views/mailbox_detail.py create mode 100644 templates/emails/transactional/verify-mailbox-change.html create mode 100644 templates/emails/transactional/verify-mailbox-change.txt diff --git a/app/dashboard/__init__.py b/app/dashboard/__init__.py index 2f432540..3d981918 100644 --- a/app/dashboard/__init__.py +++ b/app/dashboard/__init__.py @@ -16,4 +16,5 @@ from .views import ( directory, mailbox, deleted_alias, + mailbox_detail, ) diff --git a/app/dashboard/templates/dashboard/mailbox.html b/app/dashboard/templates/dashboard/mailbox.html index be3c4b24..95589d31 100644 --- a/app/dashboard/templates/dashboard/mailbox.html +++ b/app/dashboard/templates/dashboard/mailbox.html @@ -20,13 +20,15 @@ A mailbox is just another personal email address. When creating a new alias, you could choose the mailbox that owns this alias, i.e:
- all emails sent to this alias will be forwarded to this mailbox
- - from this mailbox, you can reply/send emails from the alias.
+ - from this mailbox, you can reply/send emails from the alias.

- By default, all aliases are owned by your email {{ current_user.email }}.

+ {% if current_user.full_mailbox %} + When you signed up, a mailbox is automatically created with your email {{ current_user.email }} +

+ {% endif %} The mailbox doesn't have to be your email: it can be your friend's email - if you want to create aliases for your buddy.
- They just need to validate this mailbox when they receive the activation email. + if you want to create aliases for your buddy. {% for mailbox in mailboxes %} @@ -45,8 +47,10 @@
Created {{ mailbox.created_at | dt }}
- {{ mailbox.nb_alias() }} aliases. + {{ mailbox.nb_alias() }} aliases.
+ + Edit ➡