mirror of
https://github.com/DJSundog/wg-portal.git
synced 2024-11-23 07:03:50 -05:00
fix TLS for email sending
This commit is contained in:
parent
6ece6e5be9
commit
29cd73aa46
@ -71,9 +71,9 @@ func SendEmailWithAttachments(cfg MailConfig, sender, replyTo, subject, body str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.CertValidation {
|
if cfg.TLS {
|
||||||
return e.Send(hostname, auth)
|
return e.SendWithStartTLS(hostname, auth, &tls.Config{InsecureSkipVerify: !cfg.CertValidation})
|
||||||
} else {
|
} else {
|
||||||
return e.SendWithStartTLS(hostname, auth, &tls.Config{InsecureSkipVerify: true})
|
return e.Send(hostname, auth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user