Hello. We use Apsose.Email for extracting .eml files which come to the server for the further processing. We have an .eml file from the customer which seems to be valid, but fails with “Specified argument was out of the range of valid values.” exception at Aspose.Email.MailMessage.Save on assembling it back after the processing. I’ve made some research and found the following:
- Seems that the issue is caused by .msg file, attached to eml. msg extracted from eml using Attachment.Save or via saving Attachment.ContentStream to file can’t be opened in Outlook.
- If open .eml file in Outlook and save the .msg attachment to disk manually (through save as), it seems to be opened in Outlook well.
- In our code, if suspend the mail processing and replace the msg, extracted by Aspose, by msg, saved manually from Outlook, the processing does not fail.
I’ve attached the .eml file causing the issue and the code demonstrating how I try to extract the attachment. Can you please take a look at this issue?
AsposeEmlSample.zip (25.2 KB)