Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string Port int Username string Password string DomainName string Defaults Defaults }
Config represents a configuration to connect to an SMTP server
type Defaults ¶ added in v0.7.1
Defaults is the default values for the mailer if none are explicitly mentioned
type Mail ¶
type Mail struct { Subject string To string Cc []string Bcc []string From string Error error Tpl *template.Template TplData interface{} }
Mail represents an email to be sent
type Mailer ¶ added in v0.7.1
type Mailer struct { *mail.SMTPClient Defaults Defaults DomainName string }
Mailer is the struct that is used to send mail, can only be used once connected to mailer
func (*Mailer) CheckSendable ¶ added in v0.7.1
CheckSendable verifies that the email can be sent
type MailerInit ¶ added in v0.7.1
type MailerInit struct { SMTPServer mail.SMTPServer Defaults Defaults DomainName string }
MailerInit is the config store for the mailer, can be initialised once then connected multiple times
func (*MailerInit) ConnectMailer ¶ added in v0.7.1
func (m *MailerInit) ConnectMailer() *Mailer
ConnectMailer connects to the mail server
Click to show internal directories.
Click to hide internal directories.