Napivo1972 Posted April 21, 2005 Posted April 21, 2005 This is a borderline allowed mail so I will not be surprised if this gets deleted. I wonder does anybody know how to read an outlook .msg file extracting from, to, cc, bcc, subject, body and attachments without using outlook? Any pointers are appreciated. Quote
HJB417 Posted April 21, 2005 Posted April 21, 2005 yes but the code that I've written is about 8 c# classes, primariliy because it parses MIME emails. Quote
Napivo1972 Posted April 22, 2005 Author Posted April 22, 2005 yes but the code that I've written is about 8 c# classes' date=' primariliy because it parses MIME emails.[/quote'] Lol, sorry I asked then�. I was hoping there was an easy way to get this done�. I guess If you search google and don�t find the answer there is a good reason for that. However do you know where I can find an explanation of the file format? Quote
HJB417 Posted April 22, 2005 Posted April 22, 2005 rfc 822 would be a start. I use two methods to parse emails. 1)HB.Net.Mail.Collections.HeaderCollection has a static method, Parse(string text) that will get the headers such as To, From, Cc, Subject, Date, etc. 2) HB.Net.Mail.Mime.MimePartContent has a static method Parse(string data) that can parse MIME emails. It will throw an exception if the email isn't a mime message. Also, the password to access the repository is view/view Other than that, you can probably just buy a library that does the same thing that mine does or whatever it is you're trying to accomplish. Quote
Napivo1972 Posted April 25, 2005 Author Posted April 25, 2005 Thank you very much. I have downloaded the files and they look helpfull for me. I am glad you wanted to share them with me. I'll look at them in more detail this afternoon but already wanted to thank you. Quote
HJB417 Posted April 25, 2005 Posted April 25, 2005 well, if you need any help, I can give u code that demonstartes how the use the classes to perform a certain task. Quote
mark007 Posted April 26, 2005 Posted April 26, 2005 If it's in outlook you could use the outlook com object model to get the details... Quote Please check the Knowledge Base before you post. "Computers are useless. They can only give you answers." - Pablo Picasso The Code Net
Napivo1972 Posted April 26, 2005 Author Posted April 26, 2005 This is for a helpdesk (Complaint management) system I need to write. Trouble is not every computer here has outlook or even office installed. I want to be able to read the contents of a mail and (If I ménage) send mail directly from my program. The trouble is our old program depended on outlook; they used to move the mails into a directory structure. I could of course use outlooks com objects but I rather not. Actually I would like to point out http://www.dimastr.com/redemption/. Redemption is a nice library that lets you work with outlook without the trouble of the protection against viruses. Yes this includes adding and deletion of contacts and sending e-mails but it still needs outlook :( Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.