fix: email template

This commit is contained in:
Lakhan Samani 2021-10-04 12:19:27 +05:30
parent 5acf59d16e
commit b34b385be5

View File

@ -42,7 +42,7 @@ func SendVerificationMail(toEmail, token string) error {
<![endif]--> <![endif]-->
</head> </head>
<body> <body style="font-family: sans-serif;">
<div class="es-wrapper-color"> <div class="es-wrapper-color">
<!--[if gte mso 9]> <!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
@ -68,21 +68,16 @@ func SendVerificationMail(toEmail, token string) error {
<table width="100%%" cellspacing="0" cellpadding="0"> <table width="100%%" cellspacing="0" cellpadding="0">
<tbody> <tbody>
<tr> <tr>
<td class="esd-block-image es-m-txt-c es-p5b" style="font-size:0" align="center"><a target="_blank"><img src="%s" alt="icon" style="display: block;" title="icon" width="30"></a></td> <td class="esd-block-image es-m-txt-c es-p5b" style="font-size:0;padding:10px" align="center"><a target="_blank"><img src="%s" alt="icon" style="display: block;" title="icon" width="30"></a></td>
</tr> </tr>
<tr>
<td class="esd-block-text es-m-txt-c" align="center"> <tr style="background: rgb(249,250,251);padding: 10px;margin-bottom:10px;border-radius:5px;">
<h2>Hey there 👋<br></h2> <td class="esd-block-text es-m-txt-c es-p15t" align="center" style="padding:10px;padding-bottom:30px;">
<p>Hey there 👋</p>
<p>We received a request to sign-up for <b>%s</b>. If this is correct, please confirm your email address by clicking the button below.</p> <br/>
<a href="%s" class="es-button" target="_blank" style="text-decoration: none;padding:10px 15px;background-color: rgba(59,130,246,1);color: #fff;font-size: 1em;border-radius:5px;">Confirm Email</a>
</td> </td>
</tr> </tr>
<tr>
<td class="esd-block-text es-m-txt-c es-p15t" align="center">
<p>We received a request to signup for <b>%s</b>. If this is correct, please confirm by clicking the button below.</p>
</td>
</tr>
<tr>
<td class="esd-block-button es-p20t es-p15b es-p10r es-p10l" align="center"><span class="es-button-border"><a href="%s" class="es-button" target="_blank" style="text-decoration: none;padding:10px;background-color: rgba(59,130,246,1);color: #fff;font-size: 1.2em;">Confirm Email</a></span></td>
</tr>
</tbody> </tbody>
</table> </table>
</td> </td>
@ -137,10 +132,7 @@ func SendForgotPasswordMail(toEmail, token, host string) error {
<title></title> <title></title>
<!--[if (mso 16)]> <!--[if (mso 16)]>
<style type="text/css"> <style type="text/css">
a {text-decoration: none;} a {}
.es-button {
}
</style> </style>
<![endif]--> <![endif]-->
<!--[if gte mso 9]><style>sup { font-size: 100%% !important; }</style><![endif]--> <!--[if gte mso 9]><style>sup { font-size: 100%% !important; }</style><![endif]-->
@ -154,7 +146,7 @@ func SendForgotPasswordMail(toEmail, token, host string) error {
<![endif]--> <![endif]-->
</head> </head>
<body> <body style="font-family: sans-serif;">
<div class="es-wrapper-color"> <div class="es-wrapper-color">
<!--[if gte mso 9]> <!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
@ -180,21 +172,16 @@ func SendForgotPasswordMail(toEmail, token, host string) error {
<table width="100%%" cellspacing="0" cellpadding="0"> <table width="100%%" cellspacing="0" cellpadding="0">
<tbody> <tbody>
<tr> <tr>
<td class="esd-block-image es-m-txt-c es-p5b" style="font-size:0" align="center"><a target="_blank"><img src="%s" alt="icon" style="display: block;" title="icon" width="30"></a></td> <td class="esd-block-image es-m-txt-c es-p5b" style="font-size:0;padding:10px" align="center"><a target="_blank"><img src="%s" alt="icon" style="display: block;" title="icon" width="30"></a></td>
</tr> </tr>
<tr>
<td class="esd-block-text es-m-txt-c" align="center"> <tr style="background: rgb(249,250,251);padding: 10px;margin-bottom:10px;border-radius:5px;">
<h2>Hey there 👋<br></h2> <td class="esd-block-text es-m-txt-c es-p15t" align="center" style="padding:10px;padding-bottom:30px;">
<p>Hey there 👋</p>
<p>We received a request to reset password for email: <b>%s</b>. If this is correct, please reset the password clicking the button below.</p> <br/>
<a href="%s" class="es-button" target="_blank" style="text-decoration: none;padding:10px 15px;background-color: rgba(59,130,246,1);color: #fff;font-size: 1em;border-radius:5px;">Reset Password</a>
</td> </td>
</tr> </tr>
<tr>
<td class="esd-block-text es-m-txt-c es-p15t" align="center">
<p>We received a request to reset password for email: <b>%s</b>. If this is correct, please reset the password clicking the button below.</p>
</td>
</tr>
<tr>
<td class="esd-block-button es-p20t es-p15b es-p10r es-p10l" align="center"><span class="es-button-border"><a href="%s" class="es-button" target="_blank" style="text-decoration: none;padding:10px;background-color: rgba(59,130,246,1);color: #fff;font-size: 1.2em;">Reset Password</a></span></td>
</tr>
</tbody> </tbody>
</table> </table>
</td> </td>
@ -217,7 +204,8 @@ func SendForgotPasswordMail(toEmail, token, host string) error {
<div style="position: absolute; left: -9999px; top: -9999px; margin: 0px;"></div> <div style="position: absolute; left: -9999px; top: -9999px; margin: 0px;"></div>
</body> </body>
</html> </html>
`, constants.ORGANIZATION_LOGO, toEmail, constants.AUTHORIZER_URL+"/verify_email"+"?token="+token) `, constants.ORGANIZATION_LOGO, toEmail, constants.RESET_PASSWORD_URL+"?token="+token)
bodyMessage := sender.WriteHTMLEmail(Receiver, Subject, message) bodyMessage := sender.WriteHTMLEmail(Receiver, Subject, message)
return sender.SendMail(Receiver, Subject, bodyMessage) return sender.SendMail(Receiver, Subject, bodyMessage)