Use OpenSSL to access and use the Google IMAP service

Source: Internet
Author: User
Tags imap openssl library

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.