Share via


How to read eml files with attachments using c#

Question

Tuesday, February 3, 2009 8:07 PM

Hi,

I am trying to developing email backup utility. I had downloaded emails from my server and stored them as .eml files so that i can view them even when i am offline. Now i want to read those eml files using c# and show the content including attachments. Can you please tell me how to read eml files with attachments using c#

thanks
Sudhir Kumarsudhirpkumar

All replies (6)

Wednesday, February 4, 2009 8:08 PM âś…Answered

Thaat's part of the IMAP protocol. If you can not extract data from someone else's IMAP storage, write your own IMAP client and save mails in a format that you can understand.MSMVP VC++


Tuesday, February 3, 2009 10:13 PM

How did you save the files? I feel strange that you can write in a format but can not read from the same format.

MSMVP VC++


Wednesday, February 4, 2009 6:47 PM

hi,

Thanks you very much. That an interesting doubt you had raised which made me to experiment. but i could'nt succeed. i had saved the email content to eml file using third party component called rebex.net for IMAP. But using that component, every time we request for mail content it will content to the mail server, fetch mail content and will display that. But i need a way to rad it from my downloaded eml files. Can you please suggest me a way to parse eml files

thanks and regards
sudhir Kumarsudhirpkumar


Wednesday, December 30, 2009 5:50 AM

Check this out
http://www.codeproject.com/KB/office/EML_Reader.aspx


Sunday, May 22, 2011 6:42 PM

Excuse me,

In Visual C# .Net FrameWork 4.0 2010 Express. I can not find method Load of class MailMessage or method Save of class Attachment.

So, You coded it or install other version visual C#?

Thank!


Thursday, September 27, 2012 8:52 AM

Ultimate Mail library has MailMessage class that helps you parse and extract your attachment.