当前位置: 动力学知识库 > 问答 > 编程问答 >

email - How to retrieve the number of E-mail messages from mail server using VB.net and IMAP?

问题描述:

I managed to get a successful reply from the mail server (Gmail.com) using IMAP and vb.net with this code in this post

Now, I want to retrieve the number of E-mail messages from Inbox folder, how to do it?!

网友答案:

After you connect to the server, you'll issue a set of commands like this:

A001 LOGIN <username> <password>
A002 SELECT INBOX

In response to the SELECT INBOX, the server will respond with a bunch of responses:

* OK [UIDVALIDITY 38]
* 13 EXISTS
* 0 RECENT
A002 OK Inbox selected.
...

The EXISTS response is the number of messages in the INBOX.

分享给朋友:
您可能感兴趣的文章:
随机阅读: