mail_test.go 319 B

1234567891011121314151617181920
  1. package dao
  2. import (
  3. "testing"
  4. . "github.com/smartystreets/goconvey/convey"
  5. "gopkg.in/gomail.v2"
  6. )
  7. var (
  8. m = gomail.NewMessage()
  9. )
  10. func Test_SendMail(t *testing.T) {
  11. Convey("test send mail", t, func() {
  12. m.SetHeader("To", "fengyifeng@bilibili.com")
  13. m.SetHeader("Subject", "unit test")
  14. d.SendMail(m)
  15. })
  16. }