21 lines
366 B
Go
21 lines
366 B
Go
package lib
|
|
|
|
import "testing"
|
|
|
|
func TestNotify_SendMail(t *testing.T) {
|
|
notify := &Notify{
|
|
Subject: "测试主题",
|
|
MainContent: "测试内容",
|
|
EmailServer: NotifyEmail{
|
|
Server: "xxx",
|
|
Port: 587,
|
|
From: "xxx",
|
|
Password: "xxx",
|
|
To: []string{"xxx"},
|
|
FromName: "xxx",
|
|
},
|
|
}
|
|
ok, err := notify.SendMail()
|
|
t.Log(ok, err)
|
|
}
|