Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mailer ¶
type Mailer struct { DevMode bool From string // SentMessages is slice of mail that is collected when DevMode is true. SentMail []Message // contains filtered or unexported fields }
Mailer stores state required to connect to a mail server and send emails. It requires a view.Renderer so that it can send HTML emails.
func New ¶
Creates a new mailer, accepting a renderer which is used to render HTML emails, the mailer host, and the mailer auth.
func (*Mailer) NewMessage ¶
Creates a new message that can be modified and delivered via Send
func (*Mailer) ResetSentMail ¶
func (m *Mailer) ResetSentMail()
type Message ¶
type Message struct { To []string From string Subject string SentAt time.Time Body string ContentType string Contents []MessageBody // contains filtered or unexported fields }
Message is used to store the data required to send an email.
type MessageBody ¶
Click to show internal directories.
Click to hide internal directories.