dev: transactional emails

This commit is contained in:
pablohashescobar 2023-11-29 21:16:38 +05:30
parent 6ece5a57e2
commit e7dcabe851
5 changed files with 1911 additions and 139 deletions

View File

@ -73,6 +73,7 @@ def forgot_password(first_name, email, uidb64, token, current_site):
context = { context = {
"first_name": first_name, "first_name": first_name,
"forgot_password_url": abs_url, "forgot_password_url": abs_url,
"email": email,
} }
html_content = render_to_string("emails/auth/forgot_password.html", context) html_content = render_to_string("emails/auth/forgot_password.html", context)

View File

@ -87,6 +87,7 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor):
"email": email, "email": email,
"first_name": user.first_name or user.display_name or user.email, "first_name": user.first_name or user.display_name or user.email,
"workspace_name": workspace.name, "workspace_name": workspace.name,
"abs_url": abs_url,
} }
html_content = render_to_string( html_content = render_to_string(

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="format-detection" content="telephone=no" /> <meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title> <title>Your unique Plane login code is code</title>
<style type="text/css" emogrify="no"> <style type="text/css" emogrify="no">
#outlook a { #outlook a {
padding: 0; padding: 0;
@ -132,44 +132,50 @@
width: 100% !important; width: 100% !important;
} }
.r10-i { .r10-i {
padding-bottom: 15px !important;
padding-left: 15px !important;
padding-right: 15px !important;
padding-top: 15px !important;
}
.r11-i {
padding-bottom: 10px !important;
padding-top: 10px !important;
text-align: left !important;
}
.r12-i {
padding-bottom: 10px !important; padding-bottom: 10px !important;
padding-left: 0px !important; padding-left: 0px !important;
padding-right: 0px !important; padding-right: 0px !important;
padding-top: 10px !important; padding-top: 10px !important;
} }
.r11-i { .r13-i {
padding-bottom: 15px !important; background-color: #ffffff !important;
padding-top: 15px !important; padding-bottom: 5px !important;
padding-top: 5px !important;
text-align: left !important; text-align: left !important;
} }
.r12-i { .r14-i {
background-color: #ffffff !important; background-color: #ffffff !important;
padding-bottom: 15px !important; padding-bottom: 15px !important;
padding-top: 15px !important; padding-top: 15px !important;
text-align: left !important; text-align: left !important;
} }
.r13-i { .r15-i {
padding-bottom: 0px !important; padding-bottom: 0px !important;
padding-left: 15px !important; padding-left: 15px !important;
padding-right: 15px !important; padding-right: 15px !important;
padding-top: 0px !important; padding-top: 0px !important;
} }
.r14-c { .r16-c {
box-sizing: border-box !important; box-sizing: border-box !important;
text-align: center !important; text-align: center !important;
width: 100% !important; width: 100% !important;
} }
.r15-i { .r17-i {
padding-bottom: 5px !important; padding-bottom: 5px !important;
padding-top: 5px !important; padding-top: 5px !important;
} }
.r16-i { .r18-o {
padding-bottom: 15px !important;
padding-left: 15px !important;
padding-right: 15px !important;
padding-top: 15px !important;
}
.r17-o {
border-bottom-color: #efefef !important; border-bottom-color: #efefef !important;
border-bottom-width: 2px !important; border-bottom-width: 2px !important;
border-left-color: #efefef !important; border-left-color: #efefef !important;
@ -182,45 +188,45 @@
margin: 0 auto 0 0 !important; margin: 0 auto 0 0 !important;
width: 100% !important; width: 100% !important;
} }
.r18-i { .r19-i {
padding-bottom: 5px !important; padding-bottom: 5px !important;
padding-left: 5px !important; padding-left: 5px !important;
padding-right: 5px !important; padding-right: 5px !important;
padding-top: 5px !important; padding-top: 5px !important;
text-align: left !important; text-align: left !important;
} }
.r19-i { .r20-i {
padding-bottom: 5px !important; padding-bottom: 5px !important;
padding-left: 15px !important; padding-left: 15px !important;
padding-right: 15px !important; padding-right: 15px !important;
padding-top: 5px !important; padding-top: 5px !important;
} }
.r20-c { .r21-c {
box-sizing: border-box !important; box-sizing: border-box !important;
width: 100% !important; width: 100% !important;
} }
.r21-i { .r22-i {
font-size: 0px !important; font-size: 0px !important;
padding-bottom: 10px !important; padding-bottom: 10px !important;
padding-left: 65px !important; padding-left: 65px !important;
padding-right: 65px !important; padding-right: 65px !important;
padding-top: 10px !important; padding-top: 10px !important;
} }
.r22-c { .r23-c {
box-sizing: border-box !important; box-sizing: border-box !important;
width: 32px !important; width: 32px !important;
} }
.r23-o {
border-style: solid !important;
margin-right: 8px !important;
width: 32px !important;
}
.r24-o { .r24-o {
border-style: solid !important;
margin-right: 8px !important;
width: 32px !important;
}
.r25-o {
border-style: solid !important; border-style: solid !important;
margin-right: 0px !important; margin-right: 0px !important;
width: 32px !important; width: 32px !important;
} }
.r25-i { .r26-i {
padding-bottom: 0px !important; padding-bottom: 0px !important;
padding-top: 5px !important; padding-top: 5px !important;
text-align: center !important; text-align: center !important;
@ -433,11 +439,11 @@
cellpadding="0" cellpadding="0"
border="0" border="0"
role="presentation" role="presentation"
width="200" width="150"
class="r9-o" class="r9-o"
style=" style="
table-layout: fixed; table-layout: fixed;
width: 200px; width: 150px;
" "
> >
<tr> <tr>
@ -449,7 +455,7 @@
> >
<img <img
src="https://img.mailinblue.com/5942152/images/content_library/original/64708f00b503b149db7ff135.png" src="https://img.mailinblue.com/5942152/images/content_library/original/64708f00b503b149db7ff135.png"
width="200" width="150"
border="0" border="0"
style=" style="
display: block; display: block;
@ -484,7 +490,7 @@
<tr> <tr>
<td <td
class="r10-i" class="r10-i"
style="padding-bottom: 10px; padding-top: 10px" style="padding-bottom: 15px; padding-top: 15px"
> >
<table <table
width="100%" width="100%"
@ -548,63 +554,28 @@
color: #3b3f44; color: #3b3f44;
font-family: georgia, serif; font-family: georgia, serif;
font-size: 16px; font-size: 16px;
word-break: break-word;
line-height: 1.5; line-height: 1.5;
padding-bottom: 15px; word-break: break-word;
padding-top: 15px; padding-bottom: 10px;
padding-top: 10px;
text-align: left; text-align: left;
" "
> >
<div> <div>
<p style="margin: 0"> <h2
<span style="font-size: 17px" class="default-heading2"
>The code below is only style="
valid for 10 minutes.</span margin: 0;
> color: #1f2d3d;
</p> font-family: arial,
</div> helvetica, sans-serif;
</td> font-size: 32px;
</tr> word-break: break-word;
</table> "
</td> >
</tr> The code below is only valid
<tr> for 10 minutes.
<td class="r8-c" align="left"> </h2>
<table
cellspacing="0"
cellpadding="0"
border="0"
role="presentation"
width="50%"
class="r9-o"
style="
table-layout: fixed;
width: 50%;
"
>
<tr>
<td
align="left"
valign="top"
class="r12-i nl2go-default-textstyle"
style="
color: #3b3f44;
font-family: georgia, serif;
font-size: 16px;
line-height: 1.5;
word-break: break-word;
background-color: #ffffff;
padding-bottom: 15px;
padding-top: 15px;
text-align: left;
"
>
<div>
<p style="margin: 0">
<span style="font-size: 24px"
>{{code}}</span
>
</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -632,7 +603,10 @@
style="table-layout: fixed; width: 100%" style="table-layout: fixed; width: 100%"
> >
<tr> <tr>
<td class="r13-i"> <td
class="r12-i"
style="padding-bottom: 10px; padding-top: 10px"
>
<table <table
width="100%" width="100%"
cellspacing="0" cellspacing="0"
@ -673,7 +647,160 @@
role="presentation" role="presentation"
> >
<tr> <tr>
<td class="r14-c" align="center"> <td class="r8-c" align="left">
<table
cellspacing="0"
cellpadding="0"
border="0"
role="presentation"
width="50%"
class="r9-o"
style="
table-layout: fixed;
width: 50%;
"
>
<tr>
<td
align="left"
valign="top"
class="r13-i nl2go-default-textstyle"
style="
color: #3b3f44;
font-family: georgia, serif;
font-size: 16px;
line-height: 1.5;
word-break: break-word;
background-color: #ffffff;
padding-bottom: 5px;
padding-top: 5px;
text-align: left;
"
>
<div>
<p style="margin: 0">
<span style="font-size: 24px"
>{{code}}</span
>
</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="r8-c" align="left">
<table
cellspacing="0"
cellpadding="0"
border="0"
role="presentation"
width="100%"
class="r9-o"
style="
table-layout: fixed;
width: 100%;
"
>
<tr>
<td
align="left"
valign="top"
class="r14-i nl2go-default-textstyle"
style="
color: #3b3f44;
font-family: georgia, serif;
font-size: 16px;
line-height: 1.5;
word-break: break-word;
background-color: #ffffff;
padding-bottom: 15px;
padding-top: 15px;
text-align: left;
"
>
<div>
<p style="margin: 0">
<span
style="
color: #858588;
font-size: 15px;
"
>Please copy and paste this
on the screen where you
requested this from.</span
>
</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</th>
</tr>
</table>
</td>
</tr>
</table>
<table
cellspacing="0"
cellpadding="0"
border="0"
role="presentation"
width="100%"
align="center"
class="r3-o"
style="table-layout: fixed; width: 100%"
>
<tr>
<td class="r15-i">
<table
width="100%"
cellspacing="0"
cellpadding="0"
border="0"
role="presentation"
>
<tr>
<th
width="100%"
valign="top"
class="r5-c"
style="font-weight: normal"
>
<table
cellspacing="0"
cellpadding="0"
border="0"
role="presentation"
width="100%"
class="r6-o"
style="table-layout: fixed; width: 100%"
>
<tr>
<td
valign="top"
class="r7-i"
style="
padding-left: 15px;
padding-right: 15px;
"
>
<table
width="100%"
cellspacing="0"
cellpadding="0"
border="0"
role="presentation"
>
<tr>
<td class="r16-c" align="center">
<table <table
cellspacing="0" cellspacing="0"
cellpadding="0" cellpadding="0"
@ -685,7 +812,7 @@
> >
<tr> <tr>
<td <td
class="r15-i" class="r17-i"
style=" style="
padding-bottom: 5px; padding-bottom: 5px;
padding-top: 5px; padding-top: 5px;
@ -708,7 +835,7 @@
border="0" border="0"
role="presentation" role="presentation"
valign="" valign=""
class="r15-i" class="r17-i"
height="1" height="1"
style=" style="
border-top-style: solid; border-top-style: solid;
@ -761,7 +888,7 @@
> >
<tr> <tr>
<td <td
class="r16-i" class="r10-i"
style="padding-bottom: 15px; padding-top: 15px" style="padding-bottom: 15px; padding-top: 15px"
> >
<table <table
@ -811,7 +938,7 @@
border="0" border="0"
role="presentation" role="presentation"
width="100%" width="100%"
class="r17-o" class="r18-o"
style=" style="
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
@ -866,7 +993,7 @@
<td <td
align="left" align="left"
valign="top" valign="top"
class="r18-i nl2go-default-textstyle" class="r19-i nl2go-default-textstyle"
style=" style="
color: #3b3f44; color: #3b3f44;
font-family: georgia, serif; font-family: georgia, serif;
@ -1023,7 +1150,7 @@
> >
<tr> <tr>
<td <td
class="r19-i" class="r20-i"
style="padding-bottom: 5px; padding-top: 5px" style="padding-bottom: 5px; padding-top: 5px"
> >
<table <table
@ -1066,7 +1193,7 @@
role="presentation" role="presentation"
> >
<tr> <tr>
<td class="r14-c" align="center"> <td class="r16-c" align="center">
<table <table
cellspacing="0" cellspacing="0"
cellpadding="0" cellpadding="0"
@ -1091,7 +1218,7 @@
> >
<tr> <tr>
<td <td
class="r20-c" class="r21-c"
style=" style="
display: inline-block; display: inline-block;
" "
@ -1110,7 +1237,7 @@
> >
<tr> <tr>
<td <td
class="r21-i" class="r22-i"
style=" style="
padding-bottom: 10px; padding-bottom: 10px;
padding-left: 209px; padding-left: 209px;
@ -1128,7 +1255,7 @@
<tr> <tr>
<th <th
width="40" width="40"
class="r22-c mobshow resp-table" class="r23-c mobshow resp-table"
style=" style="
font-weight: normal; font-weight: normal;
" "
@ -1139,7 +1266,7 @@
border="0" border="0"
role="presentation" role="presentation"
width="100%" width="100%"
class="r23-o" class="r24-o"
style=" style="
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
@ -1147,7 +1274,7 @@
> >
<tr> <tr>
<td <td
class="r15-i" class="r17-i"
style=" style="
font-size: 0px; font-size: 0px;
line-height: 0px; line-height: 0px;
@ -1188,7 +1315,7 @@
</th> </th>
<th <th
width="40" width="40"
class="r22-c mobshow resp-table" class="r23-c mobshow resp-table"
style=" style="
font-weight: normal; font-weight: normal;
" "
@ -1199,7 +1326,7 @@
border="0" border="0"
role="presentation" role="presentation"
width="100%" width="100%"
class="r23-o" class="r24-o"
style=" style="
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
@ -1207,7 +1334,7 @@
> >
<tr> <tr>
<td <td
class="r15-i" class="r17-i"
style=" style="
font-size: 0px; font-size: 0px;
line-height: 0px; line-height: 0px;
@ -1248,7 +1375,7 @@
</th> </th>
<th <th
width="40" width="40"
class="r22-c mobshow resp-table" class="r23-c mobshow resp-table"
style=" style="
font-weight: normal; font-weight: normal;
" "
@ -1259,7 +1386,7 @@
border="0" border="0"
role="presentation" role="presentation"
width="100%" width="100%"
class="r23-o" class="r24-o"
style=" style="
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
@ -1267,7 +1394,7 @@
> >
<tr> <tr>
<td <td
class="r15-i" class="r17-i"
style=" style="
font-size: 0px; font-size: 0px;
line-height: 0px; line-height: 0px;
@ -1308,7 +1435,7 @@
</th> </th>
<th <th
width="32" width="32"
class="r22-c mobshow resp-table" class="r23-c mobshow resp-table"
style=" style="
font-weight: normal; font-weight: normal;
" "
@ -1319,7 +1446,7 @@
border="0" border="0"
role="presentation" role="presentation"
width="100%" width="100%"
class="r24-o" class="r25-o"
style=" style="
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
@ -1327,7 +1454,7 @@
> >
<tr> <tr>
<td <td
class="r15-i" class="r17-i"
style=" style="
font-size: 0px; font-size: 0px;
line-height: 0px; line-height: 0px;
@ -1391,7 +1518,7 @@
> >
<tr> <tr>
<td <td
class="r19-i" class="r20-i"
style="padding-bottom: 5px; padding-top: 5px" style="padding-bottom: 5px; padding-top: 5px"
> >
<table <table
@ -1451,7 +1578,7 @@
<td <td
align="center" align="center"
valign="top" valign="top"
class="r25-i nl2go-default-textstyle" class="r26-i nl2go-default-textstyle"
style=" style="
color: #3b3f44; color: #3b3f44;
font-family: georgia, serif; font-family: georgia, serif;
@ -1471,8 +1598,8 @@
> >
<span style="font-size: 12px" <span style="font-size: 12px"
>This email was sent to >This email was sent to
{{email}}. Please delete this email {{email}}. Please delete if
if you aren't the intended you aren't the intended
recipient.</span recipient.</span
> >
</p> </p>

View File

@ -460,11 +460,11 @@
cellpadding="0" cellpadding="0"
border="0" border="0"
role="presentation" role="presentation"
width="200" width="150"
class="r9-o" class="r9-o"
style=" style="
table-layout: fixed; table-layout: fixed;
width: 200px; width: 150px;
" "
> >
<tr> <tr>
@ -476,7 +476,7 @@
> >
<img <img
src="https://img.mailinblue.com/5942152/images/content_library/original/64708f00b503b149db7ff135.png" src="https://img.mailinblue.com/5942152/images/content_library/original/64708f00b503b149db7ff135.png"
width="200" width="150"
border="0" border="0"
style=" style="
display: block; display: block;
@ -667,9 +667,9 @@
font-family: Georgia; font-family: Georgia;
font-size: 17px; font-size: 17px;
" "
>{{first_name}} has invited you ><b>{{first_name}}</b> has invited you
to join them in to join them in
{{workspace_name}} on Plane. <b>{{workspace_name}}</b> on Plane.
Some of our users have told Some of our users have told
us it's a privilege, but we us it's a privilege, but we
will let you be the judge of will let you be the judge of
@ -713,7 +713,7 @@
> >
<tr> <tr>
<td <td
height="18" height="20"
align="center" align="center"
valign="top" valign="top"
class="r14-i nl2go-default-textstyle" class="r14-i nl2go-default-textstyle"
@ -732,7 +732,7 @@
" "
> >
<a <a
href="#top" href="{{abs_url}}"
class="r15-r default-button" class="r15-r default-button"
target="_blank" target="_blank"
data-btn="1" data-btn="1"
@ -751,7 +751,9 @@
" "
> >
<span <span
>Join them on Plane</span ><span style="font-size: 18px"
>Join them on Plane</span
></span
></a ></a
> >
</td> </td>
@ -1619,7 +1621,7 @@
> >
<span style="font-size: 12px" <span style="font-size: 12px"
>This email was sent to >This email was sent to
contact {{email}}. Please delete {{email}}. Please delete
if you aren't the intended if you aren't the intended
recipient.</span recipient.</span
> >