首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

curl 怎么得到邮件列表

2013-07-25 
curl 如何得到邮件列表最近在做curl获取邮件但 我用这样的办法curlcurl imap://m18367258061:password@ima

curl 如何得到邮件列表
最近在做curl  获取邮件  

但 我用这样的办法  curl   curl imap://m18367258061:password@imap.126.com/INBOX

 文档这么写的 imap://user:password@mail.example.com/INBOX - Performs a folder list on the user's inbox     

得不到收箱邮件列表    加上UID 才能得到某封邮件  请问您那边是这样情况么
执行命令如下 其实里面是由3封邮件的

pop 是可以得到的
C:\>curl pop3://m18367258068:sc.002513@pop.126.com
1 2756500
2 2756498
3 2756497
4 4917

而imap 无法获取 邮件列表
C:\>curl imap://m18367258061:password@imap.126.com/
* LIST () "/" "INBOX"
* LIST (\Drafts) "/" "&g0l6P3ux-"
* LIST (\Sent) "/" "&XfJT0ZAB-"
* LIST (\Trash) "/" "&XfJSIJZk-"
* LIST (\Junk) "/" "&V4NXPpCuTvY-"
* LIST () "/" "&dcVr0pCuTvY-"

C:\>curl imap://m18367258061:password@imap.126.com/INBOX
* LIST () "/" "INBOX"
期待尽快得到答案 可加分  邮件 Curl imap
[解决办法]
curl imap://m18367258061:password@imap.126.com/INBOX 得到的是 INBOX 下面的目录列表. 你里面没有目录, 就没有东西了.
用 curl imap://m18367258061:password@imap.126.com -X "EXAMINE INBOX" 来获取邮件列表吧

curl 中的文档说明:

--url imap://mail.example.com/INBOX - Performs a folder list on the user's inbox 
--url imap://mail.example.com -X "EXAMINE INBOX" - Performs a message list on the user's inbox 
[解决办法]
看这里: http://curl.haxx.se/mail/lib-2013-03/0104.html

热点排行