Documentation
¶
Index ¶
- Constants
- Variables
- type Email
- func (e *Email) Body() string
- func (e *Email) From() string
- func (e *Email) SetBody(body string)
- func (e *Email) SetFrom(from string)
- func (e *Email) SetSubject(subject string)
- func (e *Email) SetTo(to string)
- func (e *Email) Subject() string
- func (e *Email) To() string
- func (e *Email) ToMessage() (*mail.Msg, error)
- type EmailTemplate
- type TemplateRegistry
Constants ¶
View Source
const EMAIL_FS_PREFIX = "templates/"
View Source
const TPL_PASSWORD_RESET = "password_reset"
View Source
const TPL_VERIFY_EMAIL = "verify_email"
Variables ¶
View Source
var ErrTemplateNotFound = errors.New("template not found")
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email struct {
// contains filtered or unexported fields
}
func (*Email) SetSubject ¶
type EmailTemplate ¶
type TemplateRegistry ¶
type TemplateRegistry struct {
// contains filtered or unexported fields
}
func NewTemplateRegistry ¶
func NewTemplateRegistry() *TemplateRegistry
func (*TemplateRegistry) RenderTemplate ¶
func (tr *TemplateRegistry) RenderTemplate(templateName string, subjectVars core.MailerTemplateData, bodyVars core.MailerTemplateData) (*Email, error)
Click to show internal directories.
Click to hide internal directories.