curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

POP3: UIDL for message

From: Сергей - via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 30 May 2023 14:30:44 +0700

I'm trying to get a UIDL via POP3 for a specific message, but libcurl
freezes. Receiving UIDL for all messages works fine.

My simple example:

    CURL *curl;

    CURLcode res = CURLE_OK;

    curl = curl_easy_init();

    char* cmd1="UIDL";

    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

    curl_easy_setopt(curl, CURLOPT_USERNAME, user);

    curl_easy_setopt(curl, CURLOPT_PASSWORD, password);

    curl_easy_setopt(curl, CURLOPT_URL, host);

    curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, curl_response_headers);

    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_read);

    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, cmd1);

    res = curl_easy_perform(curl);
/* Here we successfully receive some headers+data like this
1 000002885ffbcd352 000002895ffbcd35
3 0000028a5ffbcd35
*/

    // but if i want to get uidl for specific message:

    char* cmd2="UIDL 1";

    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

    curl_easy_setopt(curl, CURLOPT_USERNAME, user);

    curl_easy_setopt(curl, CURLOPT_PASSWORD, password);

    curl_easy_setopt(curl, CURLOPT_URL, host);

    curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, curl_response_headers);

    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_read);

    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, cmd2);

    res = curl_easy_perform(curl);
/*i receive headers with (that's actually expected)
+OK 1 000002885ffbcd35#015
and curl_easy_perform() freezes until timeout reached
*/
How i can correctly receive uidl for message


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-05-30