From 0f5823d0219542d5d31d1ba3a1e236b4b0cc5819 Mon Sep 17 00:00:00 2001 From: wangwei <1564413823@qq.com> Date: Fri, 19 Nov 2021 15:26:03 +0800 Subject: [PATCH] Update smtp.go --- smtp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smtp.go b/smtp.go index 2aa49c8..a157603 100644 --- a/smtp.go +++ b/smtp.go @@ -37,13 +37,13 @@ type Dialer struct { // NewDialer returns a new SMTP Dialer. The given parameters are used to connect // to the SMTP server. -func NewDialer(host string, port int, username, password string) *Dialer { +func NewDialer(host string, port int, ssl bool, username, password string) *Dialer { return &Dialer{ Host: host, Port: port, Username: username, Password: password, - SSL: port == 465, + SSL: port == 465 || ssl, } }