kefu/lib/notify_test.go

21 lines
366 B
Go
Raw Permalink Normal View History

2024-12-10 02:50:12 +00:00
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)
}