Documentation ¶
Index ¶
Constants ¶
View Source
const ( SmtpAuthPlain = "PLAIN" SmtpAuthLogin = "LOGIN" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mailer ¶
type Mailer interface { // Send sends an email with the provided Message. Send(message *Message) error }
Mailer defines a base mail client interface.
type Message ¶
type Message struct { From mail.Address To []mail.Address Bcc []mail.Address Cc []mail.Address Subject string HTML string Text string Headers map[string]string Attachments map[string]io.Reader }
Message defines a generic email message struct.
type Sendmail ¶
type Sendmail struct { }
Sendmail implements mailer.Mailer interface and defines a mail client that sends emails via the "sendmail" *nix command.
This client is usually recommended only for development and testing.
type SmtpClient ¶
type SmtpClient struct { Host string Port int Username string Password string Tls bool AuthMethod string // default to "PLAIN" }
SmtpClient defines a SMTP mail client structure that implements `mailer.Mailer` interface.
func NewSmtpClient
deprecated
func (*SmtpClient) Send ¶
func (c *SmtpClient) Send(m *Message) error
Send implements `mailer.Mailer` interface.
Click to show internal directories.
Click to hide internal directories.