Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string outputDirectory = @"C:\output";
- using (Viewer viewer = new Viewer("with_attachments.msg"))
- {
- IList<Attachment> attachments = viewer.GetAttachments();
- foreach(Attachment attachment in attachments)
- {
- string filePath = Path.Combine(outputDirectory, attachment.FileName);
- viewer.SaveAttachment(attachment.Id, File.OpenWrite(filePath));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement