feat: add option to skip TLS certificate check and ability to send test email

This commit is contained in:
Elias Schneider
2024-11-21 18:24:01 +01:00
parent a1302ef7bf
commit 653d948f73
14 changed files with 203 additions and 33 deletions

View File

@@ -27,6 +27,13 @@ var NewLoginTemplate = email.Template[NewLoginTemplateData]{
},
}
var TestTemplate = email.Template[struct{}]{
Path: "test",
Title: func(data *email.TemplateData[struct{}]) string {
return "Test email"
},
}
type NewLoginTemplateData struct {
IPAddress string
Country string
@@ -36,4 +43,4 @@ type NewLoginTemplateData struct {
}
// this is list of all template paths used for preloading templates
var emailTemplatesPaths = []string{NewLoginTemplate.Path}
var emailTemplatesPaths = []string{NewLoginTemplate.Path, TestTemplate.Path}