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.
 
 
 

15 lines
301 B

package dao
import (
"context"
"gopkg.in/gomail.v2"
)
// SendMail asynchronous send mail.
func (d *Dao) SendMail(message *gomail.Message) {
message.SetAddressHeader("From", d.email.Username, "footman")
d.cache.Do(context.TODO(), func(ctx context.Context) {
d.email.DialAndSend(message)
})
}