fix(mail): set server name in tls config so that sending mail works with skipTlsVerify set to false

This commit is contained in:
kolaente 2022-07-13 19:57:44 +02:00
parent b9793a267b
commit b1892eaf63
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -54,6 +54,7 @@ func getClient() (*mail.Client, error) {
//#nosec G402 //#nosec G402
mail.WithTLSConfig(&tls.Config{ mail.WithTLSConfig(&tls.Config{
InsecureSkipVerify: config.MailerSkipTLSVerify.GetBool(), InsecureSkipVerify: config.MailerSkipTLSVerify.GetBool(),
ServerName: config.MailerHost.GetString(),
}), }),
} }