空指针异常修复

This commit is contained in:
jinnrry
2024-01-29 19:38:33 +08:00
parent 2467061431
commit dbc125d1c2
3 changed files with 98 additions and 0 deletions

View File

@@ -68,6 +68,23 @@ func TestSendSohu(t *testing.T) {
Send(nil, e)
}
func TestSendTom(t *testing.T) {
testInit()
e := &parsemail.Email{
From: &parsemail.User{
Name: "发送人",
EmailAddress: "j@jinnrry.com",
},
To: []*parsemail.User{
{"tom@tom.com", "名"},
},
Subject: "插件测试",
Text: []byte("这是Text"),
HTML: []byte("<div>这是Html</div>"),
}
Send(nil, e)
}
func Test_domainMatch(t *testing.T) {
domain := domainMatch("qq.com", nil)