diff --git a/app/api/services/register.py b/app/api/services/register.py index aad84ad..35271b4 100644 --- a/app/api/services/register.py +++ b/app/api/services/register.py @@ -108,12 +108,28 @@ class RegisterService(BaseService): def send_register_mail(signup_email, email_uid,last_row_id,firstname): + jwt_part = jwt.encode( + {"user": email_uid, 'exp' : datetime.datetime.utcnow() + datetime.timedelta(minutes=3330)}, + RegisterService.JWT_SECRET_KEY, algorithm='HS256' + ) + panel_url = "https://qa-panel.mermsemr.com/" + link_url= str(panel_url) + '/csignup/' + jwt_part + + msg_body = f""" + Hello {firstname}, + You received this message for account verification + + Follow the link:{link_url} + + For any Support + Reach Out + """ sender_email = "support@wrenchboard.com" sender_password = 'May12002!xF7F220A97f' # Use an app-specific password if using Gmail receiver_email = signup_email - subject = "Python Email Test" - body = "This is a test email sent from Python." + subject = "verify your MERMS Account" + body = msg_body msg = MIMEMultipart()