password reset

This commit is contained in:
CHIEFSOFT\ameye
2025-09-05 21:23:59 -04:00
parent 78dd6fec6e
commit f7ba53a230
3 changed files with 59 additions and 9 deletions
+47 -1
View File
@@ -105,6 +105,44 @@ class BaseService:
support@mermsemr.com
"""
html_body = f"""\
<html>
<head></head>
<body style="font-size:14px;line-height:1.5;">
<table width="550px" border="0" cellpadding="3" cellspacing="3" background-color="#F0F8FF" style="font-size:16px">
<tr>
<td style="text-align:center">
<img style="width:150px; height:auto;" src="mermsemr.com/images/logo-pink.png" />
</td>
</tr>
<tr>
<td>
Hello <b>{firstname}!</b>
</td>
</tr>
<tr>
<td>
You received this message for account reset password<br>
</td>
</tr>
<tr>
<td>
Follow the link: <a href="{link_url}">link</a> to reset your password.<br>
</td>
</tr>
<tr>
<td>
For any support<br>
Reach Out<br>
support@mermsemr.com<br>
https://www.mermsemr.com/
</td>
</tr>
</table>
</body>
</html>
"""
sender_email = BaseService.SEND_EMAIL_FROM
sender_password = BaseService.SEND_EMAIL_PASS
receiver_email = signup_email
@@ -115,7 +153,7 @@ class BaseService:
msg['Subject'] = subject
msg['From'] = sender_email
msg['To'] = receiver_email
msg.attach(MIMEText(body, 'plain')) # or 'html' for HTML content
msg.attach(MIMEText(html_body, 'html')) # or 'html' for HTML content
try:
# For Gmail, use 'smtp.gmail.com' and port 587 (TLS) or 465 (SSL)
@@ -191,6 +229,14 @@ class BaseService:
Follow the link: <a href="{link_url}">link</a> to complete the verification process.<br>
</td>
</tr>
<tr>
<td>
For any support<br>
Reach Out<br>
support@mermsemr.com<br>
https://www.mermsemr.com/
</td>
</tr>
</table>
</body>
</html>