Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MailersByName = map[string]MailerCreator{ "smtp": SMTPMailerCreator, "sendmail": SendmailMailerCreator}
Functions ¶
This section is empty.
Types ¶
type Mailer ¶
Mailer is a interface that defines the Mail function.
func SMTPMailerCreator ¶
func SMTPMailerCreator(conf simpleconf.Config) (Mailer, error)
SMTPMailerCreator creates an SMTPMailer using configuration values in the [mail] section.
addr - The address of the smtp server (go notation) user - Username passwd - Password crammd5 - Should CRAMMD5 (on) or PLAIN (off) be used? host - The expected hostname of the mailserver (can be left out, if crammd5 is on)
func SendmailMailerCreator ¶
func SendmailMailerCreator(conf simpleconf.Config) (Mailer, error)
SendmailMailerCreator creates an SendmailMailer using configuration values in the [mail] section.
exec - The name of the executable argX - (optional) Additional arguments for the executable. X is a ascending number starting with 1
type MailerCreator ¶
type MailerCreator func(conf simpleconf.Config) (Mailer, error)
MailerCreator is a function that creates a Mailer instance from config values.
type SMTPMailer ¶
type SMTPMailer struct { Host string // Host is the expected hostname of the server Addr string // Addr is the address of the server UseCRAMMD5 bool Username string Password string }
SMTPMailer is a Mailer implementation that sends mail via an smtp server.
type SendmailMailer ¶
SendmailMailer is a Mailer implementation that sends mail using a sendmail-ish executable.
Sendmail-ish in this context means:
- The executable must accept the from address using the `-f <addr>` switch
- The executable must accept the to address as a parameter
- The executable expects a mail (including all headers) on stdin that is terminated by EOF
Click to show internal directories.
Click to hide internal directories.