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.
18 lines
319 B
18 lines
319 B
package service |
|
|
|
import ( |
|
"gopkg.in/gomail.v2" |
|
) |
|
|
|
// SendMail send email |
|
func (s *Service) SendMail(receiver string, subject string, content string) error { |
|
var ( |
|
m = gomail.NewMessage() |
|
) |
|
|
|
m.SetHeader("To", receiver) |
|
m.SetHeader("Subject", subject) |
|
m.SetBody("text/html", content) |
|
|
|
return s.dao.SendMail(m) |
|
}
|
|
|