Skip to content

Commit

Permalink
fix(mailer): forcessl config (#60)
Browse files Browse the repository at this point in the history
Co-authored-by: Rein-R3 <rein@reinsan.top>
Reviewed-At: #60
  • Loading branch information
Rein-R3 and Rein-R3 committed Jan 9, 2023
1 parent 3329d83 commit 4b5e65d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/mail/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func getClient() (*mail.Client, error) {
mail.WithTimeout((config.MailerQueueTimeout.GetDuration() + 3) * time.Second), // 3s more for us to close before mail server timeout
}

if config.MailerForceSSL.GetBool() {
opts = append(opts, mail.WithSSL())
}

if config.MailerUsername.GetString() != "" && config.MailerPassword.GetString() != "" {
opts = append(opts, mail.WithSMTPAuth(authType))
}
Expand Down

0 comments on commit 4b5e65d

Please sign in to comment.