Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SMTPCredentials ¶
type SMTPCredentials struct {
SenderLogin string `docs:";The login to be used by sender." mapstructure:"sender_login"`
SenderMail string `docs:";The email to be used to send mails." mapstructure:"sender_mail"`
SenderPassword string `docs:";The sender's password." mapstructure:"sender_password"`
SMTPServer string `docs:";The hostname of the SMTP server." mapstructure:"smtp_server"`
SMTPPort int `docs:"587;The port on which the SMTP daemon is running." mapstructure:"smtp_port"`
DisableAuth bool `docs:"false;Whether to disable SMTP auth." mapstructure:"disable_auth"`
LocalName string `docs:";The host name to be used for unauthenticated SMTP." mapstructure:"local_name"`
}
SMTPCredentials stores the credentials required to connect to an SMTP server.
func NewSMTPCredentials ¶
func NewSMTPCredentials(c *SMTPCredentials) *SMTPCredentials
NewSMTPCredentials creates a new SMTPCredentials object with the details of the passed object with sane defaults.
func (*SMTPCredentials) SendMail ¶
func (creds *SMTPCredentials) SendMail(recipient, subject, body string) error
SendMail allows sending mails using a set of client credentials.
Click to show internal directories.
Click to hide internal directories.