Skip to content

Commit

Permalink
Fixes SMTP authentication data bug
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed Oct 16, 2024
1 parent b2c70a6 commit 2828a7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notifications/smtp/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (se *SMTPEmail) New(rawConfig any) error {
// set configuration in struct
se.config = config
// init SMTP auth
if se.config.SMTPUsername == "" || se.config.SMTPPassword == "" {
if se.config.SMTPUsername != "" && se.config.SMTPPassword != "" {
se.auth = smtp.PlainAuth("", se.config.SMTPUsername, se.config.SMTPPassword, se.config.SMTPServer)
}
return nil
Expand Down

0 comments on commit 2828a7b

Please sign in to comment.