feature: verify tokens

This commit is contained in:
2024-11-17 22:28:29 +05:30
parent 26a00c9f7c
commit 9d40c9d7ec
57 changed files with 4188 additions and 276 deletions

View File

@@ -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)
}

View 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>