On Friday 20 August 2010 04:06:52 HeJin wrote: > Yesterday, I connected to my pop3 server and even sent my username and > password to. > > Here comes that I can use pop3://pop3.testserver.com.cn/mailid to get the > mail with the mailid in my mailbox, but how can I get more than one mail? > I would guess, simply do another fetch with a different mailid in the URL. Curl should reuse the prior connection.
> Can someone tell me that how to sent the RETR commond, which interface in > /curl/curl.h is for RETR? Curl sends magically the RETR command. You can test this will s.t. like that: curl -v -u 'user:pw' 'pop3://[email protected]/1' 'pop3://[email protected]/2' * About to connect() to pop.gmx.net port 110 (#0) * Trying 212.227.17.185... connected * Connected to pop.gmx.net (212.227.17.185) port 110 (#0) < +OK POP server ready H migmx001 > USER [email protected] < +OK password required for user "[email protected]" > PASS XXXXXXXXXXXXX < +OK mailbox "[email protected]" has 2 messages (2423 octets) H migmx001 > RETR 1 < +OK ... * Connection #0 to host pop.gmx.net left intact * Re-using existing connection! (#0) with host pop.gmx.net * Connected to pop.gmx.net (212.227.17.185) port 110 (#0) > RETR 2 < +OK ... * Connection #0 to host pop.gmx.net left intact > QUIT < +OK POP server signing off * Closing connection #0 So, curl works as expected. Greetings, Dirk ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
