cURL / Mailing Lists / curl-library / Single Mail


Re: Question on POP3 usage in libcurl

From: Daniel Stenberg <>
Date: Fri, 21 Oct 2011 23:47:26 +0200 (CEST)

On Fri, 21 Oct 2011, wrote:

> Do I rely on curl_easy_perform() to do all the operations inside a POP3
> transaction?

Yes, if you use the easy interface.

> I notice that when you call the function the first time it negotiates the
> login then sends LIST and returns the list of messages by their ids then
> sends QUIT. But obviously I am interested in not just the message list but
> the messages themselves. How do I re-start the transaction, or rather tell
> libcurl not to terminate the transaction until I have retrieved the actual
> messages.In other words, I need to find a way to send command RETR <id> as
> per POP3 RF1939 based on the result from LIST.

You keep the handle and then you issue follow-up requests against the same
host, port and protocol and then libcurl will re-use the connection and
continue from where you left it.

List admin:
Received on 2011-10-21