Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct { Username string // "from@yandex.ru" Password string // "token app" ServerName string // "smtp.yandex.ru:465" Identity string // "" }
MailBean - all settings for email package in Bean-like struct
type MailBean ¶
type MailBean struct { Subj string Credentials EnableNotify bool // contains filtered or unexported fields }
MailBean - all settings for email package in Bean-like struct
func NewMailBean ¶
func NewMailBean(log logrus.FieldLogger, from mail.Address, to []mail.Address, subj string, creds Credentials, enableNotify bool) *MailBean
func (*MailBean) SendEmails ¶
SendEmails - send email with default template @see email.emailTemplate const
Example ¶
Credentials := Credentials{"username", "password", "smtp.test.com:465", ""} Email := NewMailBean(nil, mail.Address{Name: "I", Address: "from@test.com"}, []mail.Address{{Name: "YOU", Address: "to@test.com"}}, "Subj mail", Credentials, true) //Email.SetFromAndToEmailAddresses(mail.Address{Name: "I", Address: "from@test.com"}, []mail.Address{{Name: "YOU", Address: "to@test.com"}}) _ = Email.SendEmails("Body text of Email")
Output:
Click to show internal directories.
Click to hide internal directories.