foens / hpop

OpenPOP.NET code repository
http://hpop.sourceforge.net/
204 stars 114 forks source link

Using POP3 vs IMAP #82

Open SoftCircuits opened 5 years ago

SoftCircuits commented 5 years ago

I need to write some code to retrieve emails and I have a general question about POP3 vs IMAP.

It looks like OpenPop.NET is strictly POP3. Do I need to worry about if the mail server I'm working with will support POP3?

Looks like IMAP is the more modern protocol. Just trying to figure out what I need before investing a lot of time writing and testing code. Thanks for any suggestions.

jstedfast commented 5 years ago

Yes, IMAP is the more modern protocol and you are correct in noting that OpenPOP only supports the POP3 protocol.

Many mail servers support both POP3 and IMAP, but they are hosted on different ports and sometimes with different host names. For example, GMail hosts IMAP on imap.gmail.com and pop.gmail.com for POP3.

Whether that means you'll need to worry about whether or not the server you are working with supports POP3 or not will depend on what you are trying to accomplish, I suppose.

If you are trying to write a general-use email client, for example, you'll want to support IMAP as well or you'll limit your customer base because those customers may or may not have access to a POP3 server and even if they do, they might prefer IMAP.

If you just want to write a program to download your own emails, then all that matters is that you have a POP3 server available to you.

If you determine that you will (also) need access to IMAP, you might consider using my library: MailKit. It supports both POP3 and IMAP as well as a slew of other features that you may find useful.

Hope that helps.