Set gomail.Dialer LocalName

This commit is contained in:
CrazyMax
2020-08-28 23:25:32 +02:00
parent b0f4f42213
commit a82cef7065
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -362,6 +362,7 @@ func TestLoadMixed(t *testing.T) {
"DIUN_NOTIF_MAIL_INSECURESKIPVERIFY=true",
"DIUN_NOTIF_MAIL_FROM=diun@foo.com",
"DIUN_NOTIF_MAIL_TO=webmaster@foo.com",
"DIUN_NOTIF_MAIL_LOCALNAME=foo.com",
},
expected: &config.Config{
Db: (&model.Db{}).GetDefaults(),
@@ -372,7 +373,7 @@ func TestLoadMixed(t *testing.T) {
Port: 25,
SSL: utl.NewFalse(),
InsecureSkipVerify: utl.NewTrue(),
LocalName: "localhost",
LocalName: "foo.com",
From: "diun@foo.com",
To: "webmaster@foo.com",
},
+1
View File
@@ -135,6 +135,7 @@ Need help, or have questions? Go to https://github.com/crazy-max/diun and leave
Password: password,
SSL: *c.cfg.SSL,
TLSConfig: tlsConfig,
LocalName: c.cfg.LocalName,
}
return dialer.DialAndSend(msg)