.NET Framework - Read email (with attachments) via POP (Exchange Server)

Asked By tiagosocze on 02-Dec-07 01:35 AM
Hello,

I need to read emails from POP (Exchange Server 2007), and get two
files attached. What the best way to do this?

Thanks




Wil Peck replied on 30-Nov-07 08:50 AM
I just wrote a small framework to do exactly what you ask that can be found
on Code Project at
(http://www.codeproject.com/useritems/NetPopMimeClient.asp).  I haven't
tested with Exchange but my guess is you'll be fine.  The framework provides
support for most POP3 commands and converts the POP3 message returned from
the server into its respective MIME parts.  The MIME parts can then in turn
be converted into a MailMessage containing any attachments, including those
of type "message/rfc822".

The source posted provides an example project demonstrating usage and
another with the source.

Please let me know if you have any questions.

Hope this helps.