When we try to generate the viewer cache for the attached test email (from Microsoft Office) ViewerHtmlHandler.GetPages() throws ‘System.ArgumentException’ with Additional information: Please provide file name with extension e.g. document.doc
email with email attachment.zip (22.1 KB)
The email contains a single attachment which is another email. The attachment doesn’t have a file type because the attached email has no extension - see the contents of the Attachment object returned from ViewerHtmlHandler.GetDocumentInfo():
|ID||“I am the attached email”||string|
|Name||“I am the attached email”||string|
|SourceDocumentGuid||“A4464.C1.email with email attachment.msg”||string|
This is with .NET GroupDocs.Viewer.dll version 18.10.
I was the ViewerHtmlHandler.GetDocumentInfo() to be able to detect that the attachment is an email (rather than DocumentType=Unknown). This attachment was added within Microsoft Office by dragging the second email into the email editor. Outlook only adds a .msg extension when you save an email - not when you attach an email to an email without saving it first.
Please advise on how to get the viewer to handle this situation.