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