Skip to content

Commit

Permalink
🍎 mail log
Browse files Browse the repository at this point in the history
  • Loading branch information
xzghua committed May 31, 2019
1 parent e37cb95 commit e8f3ca2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/mail/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ func (ep *EmailParam)SendMail2(to string) error {
zgh.ZLog().Info("message","mail to the last")
mime.WriteString("\r\n--" + boundary + "--\r\n\r\n")
auth := smtp.PlainAuth("", user, password, mailAddr)
return smtp.SendMail(host, auth, user, sendTo, mime.Bytes())
err := smtp.SendMail(host, auth, user, sendTo, mime.Bytes())
zgh.ZLog().Info("message","mail to the last","last",err)
return err
}


Expand All @@ -225,6 +227,7 @@ func SendMail( to string, subject string, body string) error {
msg = []byte(subject + contentType + body)
sendTo := strings.Split(to, ";")
err := smtp.SendMail(host, auth, user, sendTo, msg)
zgh.ZLog().Info("message","SendMail","last",err)
return err
}

0 comments on commit e8f3ca2

Please sign in to comment.