authelia/internal/templates/plaintext_email.go
James Elliott a92b0bff1d
[FEATURE] Plain Text Email Notifications (#1238)
* add a plain text email template
* use plain text email template for file based emails
* add config option to SMTP emails named disable_html_emails
  * config option is a boolean that when set to true will only send plain text emails
* add docs for more complex SMTP notifier options
* update template
* add rfc1341 multipart logic to notifier
* check for errors after identity_verification

* * fix nil ptr
* go mod tidy
* remove needless checks

* * use multipart/atlernative instead

* * add rfc5322 compliant date header

* * fix linting issues
2020-08-21 12:16:23 +10:00

27 lines
720 B
Go

package templates
import (
"text/template"
)
// PlainTextEmailTemplate the template of email that the user will receive for identity verification.
var PlainTextEmailTemplate *template.Template
func init() {
t, err := template.New("text_email_template").Parse(emailPlainTextContent)
if err != nil {
panic(err)
}
PlainTextEmailTemplate = t
}
const emailPlainTextContent = `
This email has been sent to you in order to validate your identity.
If you did not initiate the process your credentials might have been compromised. You should reset your password and contact an administrator.
To setup your 2FA please visit the following URL: {{.url}}
Please ignore this email if you did not initiate the process.
`