Merge branch 'ak/curl-imap-send-explicit-scheme' into maint
[gitweb.git] / imap-send.c
index 0f5f4760e90de236757924683478c7f25cdb653f..adb9738c308f70190f6c3996d5781e6fbc4dea3f 100644 (file)
@@ -1410,6 +1410,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
        curl_easy_setopt(curl, CURLOPT_USERNAME, server.user);
        curl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass);
 
+       strbuf_addstr(&path, server.use_ssl ? "imaps://" : "imap://");
        strbuf_addstr(&path, server.host);
        if (!path.len || path.buf[path.len - 1] != '/')
                strbuf_addch(&path, '/');