欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

[日常] imap协议读取邮件

程序员文章站 2022-07-05 15:53:47
telnet imap.sina.net 143 A01 LOGIN shihan@appdev.sinanet.com 密码 A02 list "" * //列出邮件夹 * LIST () "/" "INBOX" * LIST (\Drafts) "/" "&g0l6P1k5-" * LIST (... ......
telnet imap.sina.net 143
a01 login shihan@appdev.sinanet.com 密码
a02 list "" *				//列出邮件夹
* list () "/" "inbox"
* list (\drafts) "/" "&g0l6p1k5-"
* list (\sent) "/" "&xfjt0zab-"
* list (\trash) "/" "&xfjsijzk-"
* list (\junk) "/" "&v4nxppcutvy-"
* list () "/" "&ztzsmhaeylntyq-"
* list () "/" "&yhf2hgjtu2e-"
* list () "/" "&twfogpaad+u-"
* list () "/" "shihan11"
* list () "/" "&buul1q-21"
* list () "/" "&buul1q-22"
* list () "/" "&buul1q-23"
* list () "/" "shihan11@&xfjt0zab-"
* list () "/" "shihan@&kk5o9g-"
* list () "/" "shihan@&xfjt0zab-"
* list () "/" "xxxxxx@&kk5o9g-"
* list () "/" "xxxxxx@&xfjt0zab-"
* list () "/" "test"
a03 select inbox			//选择收件箱
* 17488 exists 				//总共
* 5087 recent               //未读
* ok [uidvalidity 1] uid validity status
* ok [uidnext 22874] predicted next uid
* flags (\answered \flagged \deleted \draft \seen)
* ok [permanentflags (\* \answered \flagged \deleted \draft \seen)] permanent flags
* ok [unseen 12292] first unseen message in inbox
a04 search all 				//列出所有收件箱邮件的序列id
17443 17444 17445 17446 17447 17448 17449 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 17465 17466 17467 17468 17469 17470 17471 17472 17473 17474 17475 17476 17477 17478 17479 17480 17481 17482 17483 17484 17485 17486 17487 17488
a06 fetch 1 full
a06 fetch 1420 full
a07 fetch 17374 rfc822 //不解析邮件,展示出完整的邮件体