Documentation
¶
Index ¶
- func New(account Account) (*mailer, error)
- func PrepareTemplate[T tmpl.Context](ctx context.Context, cfg config.Config, engine *tmpl.Engine, email Message, ...) (*mail.Message, error)
- func SendTemplate[T tmpl.Context](ctx context.Context, cfg config.Config, engine *tmpl.Engine, m Mailer, ...) error
- type Account
- type Mailer
- type Message
- type NoOpMailer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareTemplate ¶
Types ¶
type Account ¶
type Account struct { // Host should holds the SMPT host name the mailer should // use to send mails. Host string // Port should holds the SMTP port the host is listening on. Port int // Username required for authentication. Username string // Password required for authentication. Password string // From defines the default sender to use for this account. From string // AllowInsecure can be set to true to disable TLS certificate // verification. AllowInsecure bool // UseSSL can be set to either true or false to force SSL to be enabled // or disabled. If not configured, SSL will be used for the default // SSL port. UseSSL *bool }
type NoOpMailer ¶
type NoOpMailer struct{}
func (*NoOpMailer) DialAndSend ¶
func (*NoOpMailer) DialAndSend(...*mail.Message) error
Click to show internal directories.
Click to hide internal directories.