Fixed some examples in comments

This commit is contained in:
alexcesaro 2014-10-20 16:39:30 +02:00
parent ed0214dc63
commit 6af2a76be2
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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