From e7dcabe851387cfefbd7ae756790520ca4df6f5f Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Wed, 29 Nov 2023 21:16:38 +0530 Subject: [PATCH] dev: transactional emails --- .../plane/bgtasks/forgot_password_task.py | 1 + .../bgtasks/workspace_invitation_task.py | 1 + .../emails/auth/forgot_password.html | 1683 ++++++++++++++++- .../templates/emails/auth/magic_signin.html | 345 ++-- .../invitations/workspace_invitation.html | 20 +- 5 files changed, 1911 insertions(+), 139 deletions(-) diff --git a/apiserver/plane/bgtasks/forgot_password_task.py b/apiserver/plane/bgtasks/forgot_password_task.py index 1d1f44c80..d383ca68a 100644 --- a/apiserver/plane/bgtasks/forgot_password_task.py +++ b/apiserver/plane/bgtasks/forgot_password_task.py @@ -73,6 +73,7 @@ def forgot_password(first_name, email, uidb64, token, current_site): context = { "first_name": first_name, "forgot_password_url": abs_url, + "email": email, } html_content = render_to_string("emails/auth/forgot_password.html", context) diff --git a/apiserver/plane/bgtasks/workspace_invitation_task.py b/apiserver/plane/bgtasks/workspace_invitation_task.py index 03e6c1353..dc2f1c2c9 100644 --- a/apiserver/plane/bgtasks/workspace_invitation_task.py +++ b/apiserver/plane/bgtasks/workspace_invitation_task.py @@ -87,6 +87,7 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor): "email": email, "first_name": user.first_name or user.display_name or user.email, "workspace_name": workspace.name, + "abs_url": abs_url, } html_content = render_to_string( diff --git a/apiserver/templates/emails/auth/forgot_password.html b/apiserver/templates/emails/auth/forgot_password.html index 76b8903d7..8abbfb00f 100644 --- a/apiserver/templates/emails/auth/forgot_password.html +++ b/apiserver/templates/emails/auth/forgot_password.html @@ -1,21 +1,1662 @@ - - - - -

- Dear {{first_name}},

- We received a request to reset your password for your Plane account. -

- To proceed with resetting your password, please click on the link below: -
- {{forgot_password_url}} -

- If you didn't request to reset your password, please ignore this email. Your account will remain secure. -

- If you have any questions or need further assistance, please contact our support team. -

- Thank you for using Plane. -

- - - \ No newline at end of file + + + + + + + + Set a new password to your Plane account + + + + + + + + + + + + + + + diff --git a/apiserver/templates/emails/auth/magic_signin.html b/apiserver/templates/emails/auth/magic_signin.html index 2ba6c5463..06fc5e830 100644 --- a/apiserver/templates/emails/auth/magic_signin.html +++ b/apiserver/templates/emails/auth/magic_signin.html @@ -9,7 +9,7 @@ - + Your unique Plane login code is code