satellite/{console,emails}: add activation code email

This change adds an email template for sending activation codes.

Issue: #6428

Change-Id: Ief56a2e32ac0a335561572b9573215da24d9146b
This commit is contained in:
Wilfred Asomani 2023-11-15 08:52:48 +00:00
parent 15b90661f4
commit f09f352628
2 changed files with 321 additions and 0 deletions

View File

@ -19,6 +19,17 @@ func (*AccountActivationEmail) Template() string { return "Welcome" }
// Subject gets email subject.
func (*AccountActivationEmail) Subject() string { return "Activate your email" }
// AccountActivationCodeEmail is mailservice template with activation code.
type AccountActivationCodeEmail struct {
ActivationCode string
}
// Template returns email template name.
func (*AccountActivationCodeEmail) Template() string { return "WelcomeWithCode" }
// Subject gets email subject.
func (*AccountActivationCodeEmail) Subject() string { return "Activate your email" }
// ForgotPasswordEmail is mailservice template with reset password data.
type ForgotPasswordEmail struct {
Origin string

View File

@ -0,0 +1,310 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings></xml>
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<title></title>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
table,
td,
tr {
vertical-align: top;
border-collapse: collapse;
}
* {
line-height: inherit;
}
a[x-apple-data-detectors=true] {
color: inherit !important;
text-decoration: none !important;
}
</style>
<style type="text/css" id="media-query">
@media (max-width: 540px) {
.block-grid,
.col {
min-width: 320px !important;
max-width: 100% !important;
display: block !important;
}
.block-grid {
width: 100% !important;
}
.col {
width: 100% !important;
}
.col>div {
margin: 0 auto;
}
.no-stack .col {
min-width: 0 !important;
display: table-cell !important;
}
.no-stack.two-up .col {
width: 50% !important;
}
.no-stack .col.num4 {
width: 33% !important;
}
.no-stack .col.num8 {
width: 66% !important;
}
.no-stack .col.num4 {
width: 33% !important;
}
.no-stack .col.num3 {
width: 25% !important;
}
.no-stack .col.num6 {
width: 50% !important;
}
.no-stack .col.num9 {
width: 75% !important;
}
}
</style>
</head>
<body class="clean-body" style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #FFFFFF;">
<!--[if IE]><div class="ie-browser"><![endif]-->
<table class="nl-container" style="table-layout: fixed; vertical-align: top; min-width: 320px; Margin: 0 auto; border-spacing: 0;
border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; background-color: #FFFFFF; width: 100%;"
cellpadding="0" cellspacing="0" role="presentation" width="100%" bgcolor="#FFFFFF" valign="top">
<tbody>
<tr style="vertical-align: top;" valign="top">
<td style="word-break: break-word; vertical-align: top;" valign="top">
<!--[if (mso)|(IE)]>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="center" style="background-color:#FFFFFF">
<![endif]-->
<div style="background-color: #FFFFFF;">
<div class="block-grid " style="Margin: 0 auto; min-width: 320px; max-width: 520px; overflow-wrap: break-word;
word-wrap: break-word; word-break: break-word; background-color: #FFFFFF;">
<div
style="border-collapse: collapse;display: table;width: 100%;background-color: #FFFFFF;">
<!--[if (mso)|(IE)]>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#FFFFFF;">
<tr><td align="center">
<table cellpadding="0" cellspacing="0" border="0" style="width:520px">
<tr class="layout-full-width" style="background-color:#FFFFFF">
<![endif]-->
<!--[if (mso)|(IE)]>
<td align="center" width="520" style="background-color:#FFFFFF;width:520px;
border-top: 0px solid #000000; border-left: 0px solid #000000;
border-bottom: 0px solid #000000; border-right: 0px solid #000000;" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td style="padding:10px 15px 0 15px;background-color:#FFFFFF;">
<![endif]-->
<div class="col num12"
style="min-width: 320px; max-width: 520px; display: table-cell; vertical-align: top; width: 520px;">
<div style="background-color: #FFFFFF;width: 100% !important;">
<!--[if (!mso)&(!IE)]><!-->
<div
style="border-top: 0px solid #000000; border-left: 0px solid #000000;
border-bottom: 0px solid #000000; border-right: 0px solid #000000; padding: 10px 15px 0 15px;">
<!--<![endif]-->
<div>
<h1 style="font-family: Helvetica, sans-serif; text-align: center;
color: #000; font-weight: 800; font-size: 38px !important;">
Youre Almost There
</h1>
</div>
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td style="padding: 10px 10px 0 10px;font-family: Helvetica, sans-serif; font-weight:300;">
<![endif]-->
<div style="color: #000000;font-family: Helvetica, sans-serif; font-weight: 300;
line-height: 1.2;padding: 10px 10px 0 10px;">
<div
style="font-family: Helvetica, sans-serif; font-weight: 300;
line-height: 1.2; font-size: 12px; color: #000000; mso-line-height-alt: 14px;">
<p
style="font-size: 14px; line-height: 1.2; mso-line-height-alt: 17px; margin: 0;">
<span style="font-size: 18px;">Hi,</span>
</p>
<p
style="font-size: 12px; line-height: 1.2; mso-line-height-alt: 14px; margin: 0;">
<br>
<span style="font-size: 18px;">You created an account on Storj.
Confirm your email address by entering the code below
to get started on the distributed cloud.
Do not share this code with anyone.
</span>
</p>
<p
style="font-size: 14px; line-height: 1.2; mso-line-height-alt: 17px; margin: 0;">
<span style="font-size: 14px;"> </span>
</p>
<h1
style="font-family: Helvetica, sans-serif;
font-weight: 500; line-height: 1.2; mso-line-height-alt: 14px; margin: 20px 0;">
{{ .ActivationCode }}
</h1>
<p
style="font-size: 14px; line-height: 1.2; mso-line-height-alt: 17px; margin: 0;">
<span style="font-size: 14px;">&nbsp;</span>
</p>
<p
style="font-size: 14px; line-height: 1.2; mso-line-height-alt: 17px; margin: 0;">
<span style="font-size: 18px;">-The Storj Team</span>
</p>
</div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
<!--[if (!mso)&(!IE)]><!-->
</div>
<!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
<!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
<div style="background-color: transparent;">
<div class="block-grid " style="Margin: 0 auto; min-width: 320px; max-width: 520px; overflow-wrap: break-word;
word-wrap: break-word; word-break: break-word; background-color: transparent;">
<div
style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]>
<table width="100%" cellpadding="0" cellspacing="0" border="0"
style="background-color:transparent;">
<tr><td align="center">
<table cellpadding="0" cellspacing="0" border="0" style="width:520px">
<tr class="layout-full-width" style="background-color:transparent">
<![endif]-->
<!--[if (mso)|(IE)]>
<td align="center"
style="background-color:transparent;width:520px; border-top: 0px solid transparent;
border-left: 0px solid transparent; border-bottom: 0px solid transparent;
border-right: 0px solid transparent;" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td style="padding:20px 0 5px 0">
<![endif]-->
<div class="col num12" style="min-width: 320px; max-width: 520px; display: table-cell;
vertical-align: top; width: 520px;">
<div style="width: 100% !important;">
<!--[if (!mso)&(!IE)]><!-->
<div style="border-top: 0px solid transparent; border-left: 0px solid transparent;
border-bottom: 0px solid transparent; border-right: 0px solid transparent;
padding: 20px 0 5px 0;">
<!--<![endif]-->
<div style="font-size: 16px;text-align: center;
font-family: Helvetica, sans-serif; font-weight: 300;">
<ul class="social-media" style="padding-top: 40px; list-style-type: none;
display: flex; padding-left: 10px;">
<li style="width: auto; margin-right: 7px;"
class="social-icon twitter">
<a href="https://twitter.com/storj">Twitter</a>
</li>
<li style="width: auto; margin-right: 7px;"
class="social-icon github">
<a href="https://github.com/storj">Github</a>
</li>
<li style="width: auto; margin-right: 7px;"
class="social-icon blog">
<a href="https://storj.io/blog">Blog</a>
</li>
<li style="width: auto; margin-right: 7px;"
class="social-icon website">
<a href="https://www.storj.io/">Website</a>
</li>
</ul>
</div>
<table class="divider" border="0" cellpadding="0" cellspacing="0"
width="100%" style="table-layout: fixed; vertical-align: top; border-spacing: 0;
border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;
min-width: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;"
role="presentation" valign="top">
<tbody>
<tr style="vertical-align: top;" valign="top">
<td class="divider_inner" style="word-break: break-word; vertical-align: top;
min-width: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
padding: 10px;" valign="top">
<table class="divider_content" border="0" cellpadding="0"
cellspacing="0" width="100%" style="table-layout: fixed; vertical-align: top;
border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt;
mso-table-rspace: 0pt; border-top: 1px solid #BBBBBB; height: 0px;
width: 100%;" align="center" role="presentation" height="0"
valign="top">
<tbody>
<tr style="vertical-align: top;" valign="top">
<td style="word-break: break-word; vertical-align: top;
-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;"
height="0" valign="top">
<span></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div style="font-size: 16px;text-align: center;
font-family: Helvetica, sans-serif; font-weight: 300;">
<div class="footer" style="padding: 40px 20px; text-align: left; color: gray;
font-size: 14px;">
<ul style="list-style-type: none; padding-left: 0;">
<li><b>Storj Labs</b></li>
<li>1450 W. Peachtree St. NW #200</li>
<li>PMB 75268</li>
<li>Atlanta, GA 30309-2955, United States</li>
</ul>
</div>
</div>
<!--[if mso]>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td style="padding10px; font-family: Helvetica, sans-serif; font-weight:300;">
<![endif]-->
<!--[if mso]></td></tr></table><![endif]-->
<!--[if (!mso)&(!IE)]><!-->
</div>
<!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
<!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
<!--[if (IE)]></div><![endif]-->
</body>
</html>