From 5884d50b1d4c19368064d5049d587d607a6c6946 Mon Sep 17 00:00:00 2001 From: ttk Date: Thu, 8 Feb 2024 10:34:31 +0800 Subject: [PATCH] feat: 994 ssl --- send/email.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/send/email.go b/send/email.go index 82631bb..d89a126 100644 --- a/send/email.go +++ b/send/email.go @@ -29,6 +29,9 @@ func (e *email) send(msg *message) (err error) { }, func() *gomail.Dialer { return gomail.NewDialer(e.conf["host"], cast.ToInt(e.conf["port"]), e.conf["account"], e.conf["password"]) }) + if cast.ToInt(e.conf["port"]) == 994 { + e.d.SSL = true + } if !cast.ToBool(e.conf["tls"]) { e.d.TLSConfig = &tls.Config{InsecureSkipVerify: true} }