cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1257 can not get imap inbox and send box list

From: Steve Holme <captain-caveman_at_users.sf.net>
Date: Mon, 15 Jul 2013 20:43:56 +0000

Hi,

The IMAP protocol is a lot more powerful, and consequently a lot more complicated, than POP3 and to a certain degree I haven't fully got my own head round the ins and outs of it :(

As such, I wouldn't recommend using the curl command line utility to extract information from an IMAP server, although it should be possible in 9 out of 10 cases, but instead use libcurl from your own program.

However, if need to use the command line tool from a batch file or shell script then I believe the SEARCH command is going to be the most useful command to you as follows:

curl imap://m18367258061:password_at_imap.126.com/INBOX -X "SEARCH NEW"

Specifying the INBOX in the URL allows libcurl to perform the SELECT command in order to change mailbox. From there libcurl will perform your custom SEARCH command specifying that you are interested in NEW emails.

If you are interested and want to know the commands that libcurl is sending to the server then specify -v for verbose output.

I hope this helps.

Kind Regards

Steve

---
** [bugs:#1257] can not get imap inbox and send box list**
**Status:** open
**Labels:** imap 
**Created:** Mon Jul 15, 2013 04:48 PM UTC by sckalman
**Last Updated:** Mon Jul 15, 2013 05:58 PM UTC
**Owner:** Steve Holme
can not get imap mail list use  imap://user:password_at_mail.example.com/INBOX - Performs a folder list on the user's inbox 
use  pop I can get 4 mails
C:\>curl pop3://m18367258068:sc.002513_at_pop.126.com
1 2756500
2 2756498
3 2756497
4 4917
but I can get mail use imap
C:\>curl imap://m18367258061:password_at_imap.126.com/
* LIST () "/" "INBOX"
* LIST (\Drafts) "/" "&g0l6P3ux-"
* LIST (\Sent) "/" "&XfJT0ZAB-"
* LIST (\Trash) "/" "&XfJSIJZk-"
* LIST (\Junk) "/" "&V4NXPpCuTvY-"
* LIST () "/" "&dcVr0pCuTvY-"
C:\>curl imap://m18367258061:password_at_imap.126.com/INBOX
* LIST () "/" "INBOX"
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2013-07-15

These mail archives are generated by hypermail.

donate! Page updated May 06, 2013.
web site info

File upload with ASP.NET