public static void Run()
{
// ExStart:ReadMessageByPreservingTNEFAttachments
// The path to the File directory.
string dataDir = RunExamples.GetDataDir_Email();
MsgLoadOptions options = new MsgLoadOptions();
options.PreserveTnefAttachments = true;
MailMessage eml = MailMessage.Load(dataDir + "EmbeddedImage1.msg", options);
foreach (Attachment attachment in eml.Attachments)
{
Console.WriteLine(attachment.Name);
}
// ExEnd:ReadMessageByPreservingTNEFAttachments
}
}