Files
2021-01-16 14:45:42 +08:00

24 lines
365 B
Go

package mail
import (
"testing"
)
func TestSend(t *testing.T) {
options := &Options{
MailHost: "smtp.163.com",
MailPort: 465,
MailUser: "xxx@163.com",
MailPass: "", //密码或授权码
MailTo: "",
Subject: "subject",
Body: "body",
}
err := Send(options)
if err != nil {
t.Error("Mail Send error", err)
return
}
t.Log("success")
}