This project is read-only.

Export Message

Feb 17, 2014 at 10:31 AM
Is it possible to export a message like .eml or .msg (as backup) ?

After is it possible read this files ?
Feb 17, 2014 at 11:43 PM
Yes you can.
See MailMessage class.

Documentation is here.

//Create MailMessage object from .eml file
String text = File.ReadAllText("C:\MyMail.eml");
var mg = new MailMessage(text);
Feb 18, 2014 at 7:34 AM
Edited Feb 18, 2014 at 8:06 AM
And how to save a message to .eml ? (also with attaches)

PS: I don't found on Documentation page ..
Feb 18, 2014 at 8:10 AM
MailMessage mg = ...;
File.WriteAlltext("C:\Temp", mg.BodyData);

Perhaps, BodyData property or other.
That property has raw data of mail.
Or you can get Text by GetMessageText method of Pop3Client(or ImapClient) class.