We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0539b5e commit b5799d9Copy full SHA for b5799d9
1 file changed
lib/imap.php
@@ -85,9 +85,12 @@ public function checkPassword($uid, $password) {
85
$groups[] = $pieces[1];
86
}
87
88
- $protocol = $this->sslmode ? "imaps" : "imap";
+ $protocol = ($this->sslmode === "ssl") ? "imaps" : "imap";
89
$url = "{$protocol}://{$this->mailbox}:{$this->port}";
90
$ch = curl_init();
91
+ if ($this->sslmode === 'tls') {
92
+ curl_setopt($ch, CURLOPT_USE_SSL, CURLUSESSL_ALL);
93
+ }
94
curl_setopt($ch, CURLOPT_URL, $url);
95
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
96
curl_setopt($ch, CURLOPT_USERPWD, $username.":".$password);
0 commit comments