Skip to content

Commit

Permalink
Update email templates (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
KafetzisThomas authored Feb 2, 2025
1 parent 816085d commit d84ce52
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 50 deletions.
9 changes: 0 additions & 9 deletions users/templates/email_templates/2fa_verification.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<title>Security Notification: 2FA Verification</title>
</head>
<body>
<h2 style="color:black">Security Notification: 2FA Verification</h2>
<p><strong style="color:black">Email:</strong> {{ user_email }}</p>
<p><strong style="color:black">OTP Secret Key:</strong> {{ secret_key }}</p>
<img id="qr-code-image" src="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=otpauth://totp/PassManagerWeb:{{ user_email }}?secret={{ secret_key }}&issuer=PassManagerWeb" alt="QR Code">
Expand Down Expand Up @@ -44,13 +43,5 @@ <h2 style="color:black">Security Notification: 2FA Verification</h2>
<li style="color:black">Submit the generated key in the form</li>
</ul>
</div>
<p style="color:black">Date of registration: {{ date_joined }}</p>

--

<p style="color:black">
Best Regards,<br>
KafetzisThomas
</p>
</body>
</html>
13 changes: 1 addition & 12 deletions users/templates/email_templates/delete_account_notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@
<title>Security Notification: Your Account Has Been Deleted</title>
</head>
<body>
<h2>Security Notification: Your Account Has Been Deleted</h2>
<p>Dear {{ user_name }},</p>
<p>We are writing to inform you that we have received and processed your request to delete your account associated with the email address {{ user_email }}.</p>
<p>Your account has now been permanently deleted from our system, and all related data has been removed in accordance with our privacy policy. This action is irreversible, and we will not be able to recover your account or any associated data in the future.</p>
<p>Thank you for using our service, and we hope to see you again in the future.</p>

--

<p style="color:black">
Best Regards,<br>
KafetzisThomas
</p>
<p>The account associated with {{ user_email }} has been deleted.</p>
</body>
</html>
1 change: 0 additions & 1 deletion users/templates/email_templates/new_user_registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<title>Admin Notification: New User Registration</title>
</head>
<body>
<h2>Admin Notification: New User Registration</h2>
<p><strong>ID:</strong> {{ user_id }}</p>
<p><strong>Email:</strong> {{ user_email }}</p>
<p><strong>Date of registration:</strong> {{ date_joined }}</p>
Expand Down
13 changes: 1 addition & 12 deletions users/templates/email_templates/update_account_notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@
<title>Security Notification: Your Account Settings Have Been Updated</title>
</head>
<body>
<h2>Security Notification: Your Account Settings Have Been Updated</h2>
<p>Dear {{ user_name }},</p>
<p>We are pleased to inform you that your account settings associated with the email address {{ user_email }} have been updated successfully.</p>
<p>If you did not make this change or if you need assistance, please <a href="mailto: passmanagerweb@gmail.com">contact</a> our support team immediately.</p>
<p>Thank you for keeping your account up to date.</p>

--

<p style="color:black">
Best Regards,<br>
KafetzisThomas
</p>
<p>The account settings for {{ user_email }} have been successfully updated.</p>
</body>
</html>
13 changes: 1 addition & 12 deletions users/templates/email_templates/update_master_password.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@
<title>Security Notification: Master Password Updated</title>
</head>
<body>
<h2>Security Notification: Master Password Updated</h2>
<p>Dear {{ user_name }},</p>
<p>We wanted to inform you that your master password has been successfully updated.</p>
<p>If you did not make this change or if you need assistance, please <a href="mailto: passmanagerweb@gmail.com">contact</a> our support team immediately.</p>
<p>Thank you for keeping your account up to date.</p>

--

<p style="color:black">
Best Regards,<br>
KafetzisThomas
</p>
<p>The master password for {{ user_email }} has been successfully updated.</p>
</body>
</html>
5 changes: 1 addition & 4 deletions users/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def send_2fa_verification(user, secret_key):
{
"secret_key": secret_key,
"user_email": user.email,
"date_joined": user.date_joined.strftime("%d/%m/%Y %H:%M:%S"),
},
)

Expand All @@ -46,7 +45,6 @@ def send_delete_account_notification(user):
"email_templates/delete_account_notification.html",
{
"user_email": user.email,
"user_name": user.username,
},
)

Expand All @@ -65,7 +63,6 @@ def send_update_account_notification(user):
"email_templates/update_account_notification.html",
{
"user_email": user.email,
"user_name": user.username,
},
)

Expand All @@ -83,7 +80,7 @@ def send_master_password_update(user):
html_message = render_to_string(
"email_templates/update_master_password.html",
{
"user_name": user.username,
"user_email": user.email,
},
)

Expand Down

0 comments on commit d84ce52

Please sign in to comment.