[#3097] added SmtpConfig.LocalName option

This commit is contained in:
Gani Georgiev
2023-08-17 19:07:56 +03:00
parent 53b20ec104
commit b2ac538580
38 changed files with 3461 additions and 3363 deletions

View File

@@ -477,6 +477,26 @@ func TestSmtpConfigValidate(t *testing.T) {
},
false,
},
// invalid ehlo/helo name
{
settings.SmtpConfig{
Enabled: true,
Host: "example.com",
Port: 100,
LocalName: "invalid!",
},
true,
},
// valid ehlo/helo name
{
settings.SmtpConfig{
Enabled: true,
Host: "example.com",
Port: 100,
LocalName: "example.com",
},
false,
},
}
for i, scenario := range scenarios {