ritesh
ritesh

Reputation:

How to use POP3 over SSL in C

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

Upvotes: 1

Views: 2025

Answers (3)

John Millikin
John Millikin

Reputation: 200796

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

Upvotes: 1

Vinko Vrsalovic
Vinko Vrsalovic

Reputation: 340231

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

Upvotes: 3

Joseph Daigle
Joseph Daigle

Reputation: 48448

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

Upvotes: 1

Related Questions