SMTP/POP3 MFC classes


Wes Clyburn already wrote an SMTP class that sent mails which were stored in CMailMessage entities. Look at his entry on the Codeguru site for details.

I took these classes and added a POP3 class, based on Wes' CSMTP class. For this, I slightly modified CMailMessage and CSMTP.

Now you can create a message in a CMailMessage class, send it using Wes' CSMTP. Or you can retrieve mails using my CPOP3 class, which stores the mails in a CMailMessage object.

However, I still had some troubles parsing the headers of retrieved mails:
  1. The Cc: field can contain several lines. CPOP3 only parses the first one.
      Cc: recipient1 
    In this case, CPOP3 only finds "recipient1".

  2. The Date: field isn't parsed at all - there are different possible date formats.

Maybe I'll add those features later ? Thanks, Wes, for the good base you provided !

Download source/demo project - 19 KB


  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date