expried password email template
This commit is contained in:
@@ -1,25 +1,112 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<!-- Tell iOS we support light mode -->
|
||||||
<title>Hi</title>
|
<meta name="color-scheme" content="light" />
|
||||||
<style>
|
<meta name="supported-color-schemes" content="light" />
|
||||||
body {
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 50px;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
margin-top: 20px;
|
|
||||||
width: 150px;
|
|
||||||
height: 150px;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
<h1>Hi {{.Username}}</h1>
|
|
||||||
|
|
||||||
<img src="{{avatar .Username}}" alt="Profile Picture" />
|
<body
|
||||||
|
style="margin: 0; padding: 0; background-color: #f7fff7; color: #000000"
|
||||||
|
>
|
||||||
|
<table
|
||||||
|
width="100%"
|
||||||
|
cellpadding="0"
|
||||||
|
cellspacing="0"
|
||||||
|
border="0"
|
||||||
|
style="background-color: #f7fff7"
|
||||||
|
>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<!-- Outer container -->
|
||||||
|
<table
|
||||||
|
width="600"
|
||||||
|
cellpadding="0"
|
||||||
|
cellspacing="0"
|
||||||
|
border="0"
|
||||||
|
style="
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #e2e8f0;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-top: 25px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
style="
|
||||||
|
padding: 30px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
color: #000000;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<p style="margin: 0 0 15px 0">
|
||||||
|
Hi <strong>{{.Username}}</strong>,
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="margin: 0 0 15px 0">
|
||||||
|
Your account password has expired and needs
|
||||||
|
to be updated to continue accessing your
|
||||||
|
account.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="margin: 0 0 15px 0">
|
||||||
|
<strong>Expiration Date:</strong><br />
|
||||||
|
{{.ExpiredAt}}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="margin: 0 0 20px 0">
|
||||||
|
For security reasons, passwords must be
|
||||||
|
updated periodically. Please reset your
|
||||||
|
password as soon as possible.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Button -->
|
||||||
|
<table
|
||||||
|
align="center"
|
||||||
|
cellpadding="0"
|
||||||
|
cellspacing="0"
|
||||||
|
border="0"
|
||||||
|
>
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
bgcolor="#1a535c"
|
||||||
|
style="border-radius: 6px"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href="{{.ResetURL}}"
|
||||||
|
style="
|
||||||
|
display: inline-block;
|
||||||
|
padding: 12px 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family:
|
||||||
|
Arial, sans-serif;
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #1a535c;
|
||||||
|
border-radius: 6px;
|
||||||
|
-webkit-text-fill-color: #ffffff;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
Reset Password
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p style="margin: 20px 0 15px 0">
|
||||||
|
If you did not expect this, please contact
|
||||||
|
your system administrator.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="margin: 0">
|
||||||
|
Thanks,<br />
|
||||||
|
<strong>{{.ServiceName}}</strong>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ func CreateEmailAccount(accountData EmailAccountData, smtpHost string, smtpPort
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (account *EmailAccount) SendEmail(toEmails []string, subject string, message string) {
|
func (account *EmailAccount) SendEmail(toEmails []string, subject string, message string) {
|
||||||
logging.Debugf("Sending an email from %s to %s", account.email, strings.Join(toEmails, ""))
|
logging.Debugf("Sending an email from %s to %s", account.email, strings.Join(toEmails, ", "))
|
||||||
|
|
||||||
ToEmailList := strings.Join(toEmails, "")
|
ToEmailList := strings.Join(toEmails, ", ")
|
||||||
|
|
||||||
mime := "MIME-version: 1.0;\r\nContent-Type: text/html; charset=\"UTF-8\";\r\n\r\n"
|
mime := "MIME-version: 1.0;\r\nContent-Type: text/html; charset=\"UTF-8\";\r\n\r\n"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user