Before accessing the Google IMAP server, we need the OpenSSL tool. telnet is not powerful when it encounters a connection that requires SSL.
OpenSSL:
Http://www.openssl.org/source/
For how to compile the OpenSSL library, see my other blog.
Http://blog.sina.com.cn/s/blog_7e0127220100zult.html
After compilation, find openssl.exe in the out32dllfolder.
The preparation is complete.
Start connecting to Google IMAP
1. Open OpenSSL and enter the following command: s_client-Connect
Imap.gmail.com: 993
2. If you see this, it indicates that you have successfully logged on to Gmail IMAP.
3. log on
4. Select the inbox. Note that all mailboxes except inbox are case sensitive.
5. Get the date of the last email
6. Retrieve all emails received on the same day
7. Get the content of the email with the UID of 135
To better use IMAP, it is critical to see rfc3501. It contains all IMAP commands. The original text is as follows:
Http://tools.ietf.org/search/rfc3501