Reading .msg or .eml files and extracting the html body

P

Peter Webb

I have just finished writing an email merge program in VBA for Outlook; it
was horrible but it works. I am rewriting it in C# using direct SMTP calls.

In .Net, there is a class MailMessage.Subject. What I want/need to be able
to do is read the subject of an existing html email, perhaps saved as a .msg
file or .eml file, to use as the template for my email merge. I could use
Outlook to open the email file and read the subject using VBA's
MailItem.htmlbody property and return the subject as an html string. But
that's a fair amount of hassle, and I was trying to avoid Outlook entirely.

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top