Fixed some examples in comments
This commit is contained in:
parent
ed0214dc63
commit
6af2a76be2
|
@ -68,7 +68,7 @@ type MessageSetting func(msg *Message)
|
|||
//
|
||||
// Example:
|
||||
//
|
||||
// msg := NewMessage(SetCharset("ISO-8859-1"))
|
||||
// msg := gomail.NewMessage(SetCharset("ISO-8859-1"))
|
||||
func SetCharset(charset string) MessageSetting {
|
||||
return func(msg *Message) {
|
||||
msg.charset = charset
|
||||
|
@ -79,7 +79,7 @@ func SetCharset(charset string) MessageSetting {
|
|||
//
|
||||
// Example:
|
||||
//
|
||||
// msg := NewMessage(SetEncoding(gomail.Base64))
|
||||
// msg := gomail.NewMessage(SetEncoding(gomail.Base64))
|
||||
func SetEncoding(enc Encoding) MessageSetting {
|
||||
return func(msg *Message) {
|
||||
msg.encoding = enc
|
||||
|
|
|
@ -27,7 +27,7 @@ type MailerSetting func(m *Mailer)
|
|||
// myFunc := func(addr string, a smtp.Auth, from string, to []string, msg []byte) error {
|
||||
// // Implement your email-sending function similar to smtp.SendMail
|
||||
// }
|
||||
// mailer := NewMailer("host", "username", "password", 25, SetSendMail(myFunc))
|
||||
// mailer := gomail.NewMailer("host", "user", "pwd", 465, SetSendMail(myFunc))
|
||||
func SetSendMail(s SendMailFunc) MailerSetting {
|
||||
return func(m *Mailer) {
|
||||
m.send = s
|
||||
|
|
Loading…
Reference in New Issue