feature: verify tokens
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
package message
|
||||
|
||||
import _ "embed"
|
||||
|
||||
//go:embed welcome.html
|
||||
var welcomeHtml string
|
||||
|
||||
type Welcome struct {
|
||||
Name string
|
||||
Name string
|
||||
VerifyURL string
|
||||
}
|
||||
|
||||
func (e *Welcome) Subject() string {
|
||||
return "Welcome"
|
||||
return "Welcome, " + e.Name
|
||||
}
|
||||
|
||||
func (e *Welcome) HtmlBody() (string, error) {
|
||||
content := `
|
||||
<p>Welcome {{.Name}}</p>
|
||||
`
|
||||
return render(layout, content, e)
|
||||
return render(layout, welcomeHtml, e)
|
||||
}
|
||||
|
4
mailer/message/welcome.html
Normal file
4
mailer/message/welcome.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<h1>Welcome to My App</h1>
|
||||
|
||||
<p>To complete your registration, please click on the link below to verify your email address:</p>
|
||||
<a href="{{.VerifyURL}}" target="_blank" rel="noopener noreferrer">Verify Email Address</a>
|
Reference in New Issue
Block a user