Documentation ¶
Overview ¶
Package email is an email handler used for sending email messages like sign up verifications and password reset requests.
Index ¶
- func SendMailSSL(addr string, auth smtp.Auth, username string, recpts []string, message []byte) error
- type Recipient
- type Sender
- func (e *Sender) SendMessage(tmpl *template.Template, subject string, data map[string]interface{}, ...) error
- func (e *Sender) SendPasswordResetMessage(temp *template.Template, receiver Recipient, resetURL string) error
- func (e *Sender) SendSignUpMessage(temp *template.Template, receiver Recipient, resetURL string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Sender ¶
type Sender struct { // You can include {{.Organization}} in you templates and get the name of the organization in your messages. Organization string // A function used to send an individual message. // This should almost never be used. SendMessage should be used instead. SendMail func(string, smtp.Auth, string, []string, []byte) error // contains filtered or unexported fields }
Sender handles all the sending of email messages like password reset and sign up.
func NewSenderAuth ¶ added in v1.0.2
NewSenderAuth returns an email handler for sending messages from a single address provided an smtp.Auth.
func (*Sender) SendMessage ¶
func (e *Sender) SendMessage(tmpl *template.Template, subject string, data map[string]interface{}, recipientList ...Recipient) error
SendMessage sends the message (as an HTML template) to the recipients Then template may include .Greeting or .Email for the information for the corresponding recipient.
Directories ¶
Path | Synopsis |
---|---|
Package smtpauth provides implementations of the smtp.Auth interface for sending messages with the LOGIN authentication mechanism, only allowed of SSL/TLS connections.
|
Package smtpauth provides implementations of the smtp.Auth interface for sending messages with the LOGIN authentication mechanism, only allowed of SSL/TLS connections. |
Click to show internal directories.
Click to hide internal directories.