GroupDocsGists
10/19/2017 - 11:21 AM

GetEmailAttachments.cs

// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
// Setup GroupDocs.Viewer config
ViewerConfig config = Utilities.GetConfigurations();

// Create image handler
ViewerImageHandler handler = new ViewerImageHandler(config);
EmailAttachment attachment = new EmailAttachment(DocumentName, "attachment-image.png");

// Get attachment original file
FileContainer container = handler.GetFile(attachment);

Console.WriteLine("Attach name: {0}, Type: {1}", attachment.Name, attachment.FileType);
Console.WriteLine("Attach stream lenght: {0}", container.Stream.Length);