How to use POP3 over SSL in C

2019-06-03 15:48发布

问题:

I would like to know and understand the steps involved in fetching mail from pop3 server using plain c language

回答1:

Steps:

  1. Connect to the server's port (usually 995) using OpenSSL
  2. Verify the certificate
  3. Send regular pop3 commands over the SSL socket you just opened. (LIST, RETR and so on)
  4. Retrieve the responses
  5. Close the socket

Or use a library that does all of the above for you



回答2:

Use one of the thousands of libraries that already exist such as libspopc.



回答3:

Use a library such as tinymail, which uses the OpenSSL library.



标签: c ssl pop3