fix: ensure AuthType is uppercase

This commit is contained in:
Derrick Hammer 2024-03-15 07:37:44 -04:00
parent 8b687d506f
commit 41f9947429
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package mailer
import ( import (
"context" "context"
"strings"
"git.lumeweb.com/LumeWeb/portal/config" "git.lumeweb.com/LumeWeb/portal/config"
"github.com/wneessen/go-mail" "github.com/wneessen/go-mail"
@ -58,7 +59,7 @@ func NewMailer(lc fx.Lifecycle, config *config.Manager, logger *zap.Logger, temp
} }
if config.Config().Core.Mail.AuthType != "" { if config.Config().Core.Mail.AuthType != "" {
options = append(options, mail.WithSMTPAuth(mail.SMTPAuthType(config.Config().Core.Mail.AuthType))) options = append(options, mail.WithSMTPAuth(mail.SMTPAuthType(strings.ToUpper(config.Config().Core.Mail.AuthType))))
} }
if config.Config().Core.Mail.SSL { if config.Config().Core.Mail.SSL {