Documentation ¶
Overview ¶
The contents of this files are modified libraris from the Go standard library. The original code can be found at https://cs.opensource.google/go/go/+/refs/tags/go1.22.2:src/net/smtp/smtp.go;l=321
Copyright belongs to the Go authors.
Index ¶
- Constants
- Variables
- func PlainAuth(identity, username, password, host string) smtp.Auth
- type Email
- type TemplateData
- type TemplateName
- type Templates
- func (t *Templates) GetRawTemplates() map[string]*fasttemplate.Template
- func (t *Templates) GetTemplate(templateName TemplateName, locale string) (*fasttemplate.Template, *fasttemplate.Template, error)
- func (t *Templates) Render(locale string, templateName TemplateName, data TemplateData) (string, string, error)
Constants ¶
View Source
const TLSPort = 465
Variables ¶
View Source
var ErrTemplateNotFound = errors.New("template not found")
Functions ¶
Types ¶
type Email ¶
type Email struct {
// contains filtered or unexported fields
}
func (*Email) SendEmail ¶ added in v0.28.0
func (sm *Email) SendEmail( _ context.Context, to string, locale string, templateName TemplateName, data TemplateData, ) error
type TemplateData ¶ added in v0.28.0
type TemplateName ¶ added in v0.28.0
type TemplateName string
const ( TemplateNameEmailVerify TemplateName = "email-verify" TemplateNameEmailConfirmChange TemplateName = "email-confirm-change" TemplateNameSigninPasswordless TemplateName = "signin-passwordless" TemplateNamePasswordReset TemplateName = "password-reset" )
type Templates ¶
type Templates struct {
// contains filtered or unexported fields
}
func (*Templates) GetRawTemplates ¶
func (t *Templates) GetRawTemplates() map[string]*fasttemplate.Template
func (*Templates) GetTemplate ¶
func (t *Templates) GetTemplate( templateName TemplateName, locale string, ) ( *fasttemplate.Template, *fasttemplate.Template, error, )
func (*Templates) Render ¶ added in v0.28.0
func (t *Templates) Render( locale string, templateName TemplateName, data TemplateData, ) (string, string, error)
Click to show internal directories.
Click to hide internal directories.