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 `mapstructure:"sender_login" docs:";The login to be used by sender."` SenderMail string `mapstructure:"sender_mail" docs:";The email to be used to send mails."` SenderPassword string `mapstructure:"sender_password" docs:";The sender's password."` SMTPServer string `mapstructure:"smtp_server" docs:";The hostname of the SMTP server."` SMTPPort int `mapstructure:"smtp_port" docs:"587;The port on which the SMTP daemon is running."` DisableAuth bool `mapstructure:"disable_auth" docs:"false;Whether to disable SMTP auth."` LocalName string `mapstructure:"local_name" docs:";The host name to be used for unauthenticated SMTP."` }
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.