Documentation ¶
Overview ¶
Package mail exposes functions to create Message object and send them.
Index ¶
- func DialAndSend(dialer *sender.Dialer, messages ...*message.Message) error
- func NewMessage(subject, body, emailType string, settings ...message.MessageSetting) *message.Message
- func NewPlainDialer(host string, port int, username, password string) *sender.Dialer
- func PlainAuth(username, password, host string) smtp.Auth
- func SendMail(auth *smtp.Auth, to, from string, msg *message.Message, host string, port int) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialAndSend ¶
DialAndSend opens a connection to the SMTP server, sends the given emails and closes the connection.
func NewMessage ¶
func NewMessage(subject, body, emailType string, settings ...message.MessageSetting) *message.Message
NewMessage creates a Message object with optional MessageSetting.
func NewPlainDialer ¶
NewPlainDialer returns a new SMTP Dialer. The given parameters are used to connect to the SMTP server.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package common contains functions, structures, constants to be used across m-mail.
|
Package common contains functions, structures, constants to be used across m-mail. |
Package message contains Message structure and implements every method on it.
|
Package message contains Message structure and implements every method on it. |
Package sender handles authentication and interaction with server.
|
Package sender handles authentication and interaction with server. |
Click to show internal directories.
Click to hide internal directories.