mirror of
https://github.com/h44z/wg-portal
synced 2025-02-26 05:49:14 +00:00
add ServerName to TLS config
This commit is contained in:
parent
0d4e12a6c1
commit
ab02f656be
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user