feat: able to set smtp ssl

This commit is contained in:
CaIon committed 2024-03-28 12:18:11 +08:00
1 parent ce7cbccfef
commit 41a2619e84
4 files changed
+16 -2

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ func SendEmail(subject string, receiver string, content string) error {
addr := fmt.Sprintf("%s:%d", SMTPServer, SMTPPort)
to := strings.Split(receiver, ";")
var err error
if SMTPPort == 465 {
if SMTPPort == 465 || SMTPSSLEnabled {
tlsConfig := &tls.Config{
InsecureSkipVerify: true,
ServerName: SMTPServer,