go-common/app/job/bbq/video/dao/email.go

13 lines
254 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package dao
import (
gomail "gopkg.in/gomail.v2"
)
// SendMail asynchronous send mail.
func (d *Dao) SendMail(message *gomail.Message) (err error) {
message.SetAddressHeader("From", d.c.Mail.From, "bbq")
err = d.email.DialAndSend(message)
return
}