From f56598803b5310cf20887843e0dd4214c985c4a4 Mon Sep 17 00:00:00 2001 From: Sergey Lanzman Date: Thu, 8 Feb 2018 22:53:44 +0200 Subject: [PATCH] Dont use SSL if SSL==false --- smtp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smtp.go b/smtp.go index 2aa49c8..1d21aba 100644 --- a/smtp.go +++ b/smtp.go @@ -78,7 +78,7 @@ func (d *Dialer) Dial() (SendCloser, error) { } } - if !d.SSL { + if d.SSL { if ok, _ := c.Extension("STARTTLS"); ok { if err := c.StartTLS(d.tlsConfig()); err != nil { c.Close()