mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-13 14:31:15 +00:00
add ServerName to TLS config
This commit is contained in:
@@ -67,7 +67,7 @@ func SendEmailWithAttachments(cfg MailConfig, sender, replyTo, subject, body, ht
|
||||
default: // MailEncryptionNone
|
||||
srv.Encryption = mail.EncryptionNone
|
||||
}
|
||||
srv.TLSConfig = &tls.Config{InsecureSkipVerify: !cfg.CertValidation}
|
||||
srv.TLSConfig = &tls.Config{ServerName: srv.Host, InsecureSkipVerify: !cfg.CertValidation}
|
||||
switch cfg.AuthType {
|
||||
case MailAuthPlain:
|
||||
srv.Authentication = mail.AuthPlain
|
||||
|
Reference in New Issue
Block a user