Post 2.3 cycle (batch #3)
[gitweb.git] / imap-send.c
index 060df834cb45bb1dd71f5bb954542cf469e92a30..d69887da5a8530b204a5f5baf7081787224fc3bd 100644 (file)
@@ -1421,8 +1421,8 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
                strbuf_release(&auth);
        }
 
-       if (server.use_ssl)
-               curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+       if (!server.use_ssl)
+               curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
 
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, server.ssl_verify);
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, server.ssl_verify);