aboutsummaryrefslogtreecommitdiff
path: root/smtp.go
diff options
context:
space:
mode:
Diffstat (limited to 'smtp.go')
-rw-r--r--smtp.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/smtp.go b/smtp.go
index 5e178f2..4c720e2 100644
--- a/smtp.go
+++ b/smtp.go
@@ -1,6 +1,7 @@
package alps
import (
+ "crypto/tls"
"fmt"
"github.com/emersion/go-smtp"
@@ -14,7 +15,7 @@ func (s *Server) dialSMTP() (*smtp.Client, error) {
var c *smtp.Client
var err error
if s.smtp.tls {
- c, err = smtp.DialTLS(s.smtp.host, nil)
+ c, err = smtp.DialTLS(s.smtp.host, &tls.Config{InsecureSkipVerify: s.Options.SkipTlsVerification})
if err != nil {
return nil, fmt.Errorf("failed to connect to SMTPS server: %v", err)
}