diff --git a/apiserver/plane/bgtasks/forgot_password_task.py b/apiserver/plane/bgtasks/forgot_password_task.py index 1d1f44c80..9bc7240a4 100644 --- a/apiserver/plane/bgtasks/forgot_password_task.py +++ b/apiserver/plane/bgtasks/forgot_password_task.py @@ -24,7 +24,7 @@ def forgot_password(first_name, email, uidb64, token, current_site): relative_link = ( f"/accounts/password/?uidb64={uidb64}&token={token}&email={email}" ) - abs_url = current_site + relative_link + abs_url = str(current_site) + relative_link instance_configuration = InstanceConfiguration.objects.filter( key__startswith="EMAIL_" diff --git a/apiserver/plane/bgtasks/magic_link_code_task.py b/apiserver/plane/bgtasks/magic_link_code_task.py index a9d58a173..2caec2b60 100644 --- a/apiserver/plane/bgtasks/magic_link_code_task.py +++ b/apiserver/plane/bgtasks/magic_link_code_task.py @@ -21,11 +21,6 @@ from plane.license.utils.instance_value import get_email_configuration @shared_task def magic_link(email, key, token, current_site): try: - if current_site: - realtivelink = f"/magic-sign-in/?password={token}&key={key}" - abs_url = current_site + realtivelink - else: - abs_url = "" instance_configuration = InstanceConfiguration.objects.filter( key__startswith="EMAIL_" @@ -69,7 +64,7 @@ def magic_link(email, key, token, current_site): # Send the mail subject = f"Your unique Plane login code is {token}" - context = {"code": token} + context = {"code": token, "email": email} html_content = render_to_string("emails/auth/magic_signin.html", context) text_content = strip_tags(html_content) diff --git a/apiserver/plane/bgtasks/workspace_invitation_task.py b/apiserver/plane/bgtasks/workspace_invitation_task.py index 03e6c1353..2cbfdaff7 100644 --- a/apiserver/plane/bgtasks/workspace_invitation_task.py +++ b/apiserver/plane/bgtasks/workspace_invitation_task.py @@ -35,7 +35,7 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor): relative_link = f"/workspace-invitations/?invitation_id={workspace_member_invite.id}&email={email}&slug={workspace.slug}" # The complete url including the domain - abs_url = current_site + relative_link + abs_url = str(current_site) + relative_link instance_configuration = InstanceConfiguration.objects.filter( key__startswith="EMAIL_" @@ -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( @@ -132,6 +133,7 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor): return except (Workspace.DoesNotExist, WorkspaceMemberInvite.DoesNotExist) as e: + print("Workspace or WorkspaceMember Invite Does not exists") return except Exception as e: # Print logs if in DEBUG mode diff --git a/apiserver/templates/emails/auth/forgot_password.html b/apiserver/templates/emails/auth/forgot_password.html index 8abbfb00f..0efe86705 100644 --- a/apiserver/templates/emails/auth/forgot_password.html +++ b/apiserver/templates/emails/auth/forgot_password.html @@ -626,7 +626,8 @@ class="r12-i nl2go-default-textstyle" style=" color: #3b3f44; - font-family: georgia, serif; + font-family: arial, + helvetica, sans-serif; font-size: 16px; line-height: 1.5; word-break: break-word; @@ -717,7 +718,8 @@ display: block; -webkit-text-size-adjust: none; color: #ffffff; - font-family: georgia, serif; + font-family: arial, + helvetica, sans-serif; font-size: 16px; " > @@ -749,7 +751,8 @@ class="r11-i nl2go-default-textstyle" style=" color: #3b3f44; - font-family: georgia, serif; + font-family: arial, + helvetica, sans-serif; font-size: 16px; line-height: 1.5; word-break: break-word; @@ -1631,7 +1634,7 @@ > This email was sent to - contact.EMAIL. Please delete + {{email}}. Please delete if you aren't the intended recipient. diff --git a/apiserver/templates/emails/auth/magic_signin.html b/apiserver/templates/emails/auth/magic_signin.html index 06fc5e830..694141b05 100644 --- a/apiserver/templates/emails/auth/magic_signin.html +++ b/apiserver/templates/emails/auth/magic_signin.html @@ -148,34 +148,28 @@ padding-right: 0px !important; padding-top: 10px !important; } - .r13-i { - background-color: #ffffff !important; - padding-bottom: 5px !important; - padding-top: 5px !important; - text-align: left !important; - } - .r14-i { - background-color: #ffffff !important; - padding-bottom: 15px !important; - padding-top: 15px !important; - text-align: left !important; - } - .r15-i { - padding-bottom: 0px !important; - padding-left: 15px !important; - padding-right: 15px !important; - padding-top: 0px !important; - } - .r16-c { - box-sizing: border-box !important; - text-align: center !important; + .r13-o { + border-bottom-color: #efefef !important; + border-bottom-width: 1px !important; + border-left-color: #efefef !important; + border-left-width: 1px !important; + border-right-color: #efefef !important; + border-right-width: 1px !important; + border-style: solid !important; + border-top-color: #efefef !important; + border-top-width: 1px !important; + margin: 0 auto 0 0 !important; width: 100% !important; } - .r17-i { - padding-bottom: 5px !important; - padding-top: 5px !important; + .r14-i { + background-color: #e3e6f1 !important; + padding-bottom: 10px !important; + padding-left: 10px !important; + padding-right: 10px !important; + padding-top: 10px !important; + text-align: left !important; } - .r18-o { + .r15-o { border-bottom-color: #efefef !important; border-bottom-width: 2px !important; border-left-color: #efefef !important; @@ -188,45 +182,54 @@ margin: 0 auto 0 0 !important; width: 100% !important; } - .r19-i { + .r16-i { padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left !important; } - .r20-i { + .r17-i { padding-bottom: 5px !important; padding-left: 15px !important; padding-right: 15px !important; padding-top: 5px !important; } - .r21-c { + .r18-c { + box-sizing: border-box !important; + text-align: center !important; + width: 100% !important; + } + .r19-c { box-sizing: border-box !important; width: 100% !important; } - .r22-i { + .r20-i { font-size: 0px !important; padding-bottom: 10px !important; padding-left: 65px !important; padding-right: 65px !important; padding-top: 10px !important; } - .r23-c { + .r21-c { box-sizing: border-box !important; width: 32px !important; } - .r24-o { + .r22-o { border-style: solid !important; margin-right: 8px !important; width: 32px !important; } - .r25-o { + .r23-i { + padding-bottom: 5px !important; + padding-top: 5px !important; + } + .r24-o { border-style: solid !important; margin-right: 0px !important; width: 32px !important; } - .r26-i { + .r25-i { padding-bottom: 0px !important; padding-top: 5px !important; text-align: center !important; @@ -646,49 +649,6 @@ border="0" role="presentation" > -
-
-
- - {{code}} - - |
-
-
|
-