You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
342 B
17 lines
342 B
package dao |
|
|
|
import ( |
|
"go-common/library/log" |
|
|
|
"gopkg.in/gomail.v2" |
|
) |
|
|
|
// SendMail asynchronous send mail. |
|
func (d *Dao) SendMail(message *gomail.Message) (err error) { |
|
message.SetAddressHeader("From", d.email.Username, "melloi") |
|
err = d.email.DialAndSend(message) |
|
if err != nil { |
|
log.Error("send email error :(%v)", err) |
|
} |
|
return |
|
}
|
|
|