feat: support optional SMTP auth (#14533)

This commit is contained in:
Danny Kopping
2024-09-03 11:51:34 +02:00
committed by GitHub
parent 0eca1fcb8b
commit f23a05075e
2 changed files with 27 additions and 5 deletions

View File

@ -203,7 +203,6 @@ func TestSMTP(t *testing.T) {
retryable: false,
},
{
// No auth, no problem!
name: "No auth mechanisms supported, none configured",
authMechs: []string{},
cfg: codersdk.NotificationsEmailConfig{
@ -213,6 +212,16 @@ func TestSMTP(t *testing.T) {
toAddrs: []string{to},
expectedAuthMeth: "",
},
{
name: "Auth mechanisms supported optionally, none configured",
authMechs: []string{sasl.Login, sasl.Plain},
cfg: codersdk.NotificationsEmailConfig{
Hello: hello,
From: from,
},
toAddrs: []string{to},
expectedAuthMeth: "",
},
/**
* TLS connections
*/