I have found that when iterating across attachments, the Extension property is null (yielding an “Object reference not set to instance of an object” exception at runtime) if the attachment’s LongFileName contains certain non alphanumeric characters. So far, these include dashes, ampersands and periods other than the one immediately preceding the file extension.
Is this a known issue? Is there a method I need to call to escape these special characters before accessing the Extension property?
Thank you for bringing this issue to our knowledge.
We are currently working to reproduce the said issue on our end with latest version of Aspose.Email for .Net v1.1.0. As soon as we are able to replicate the problem, we will log a ticket in our tracking system for correction purposes.
Note: It would be of great help that you provide us a sample message file and your source code for our review.
I am afraid, I am unable to replicate your said issue with latest version of Aspose.Email for Java v1.1.0. We need your help in providing us your sample message file and source code to reproduce the problem on our end.
Looking forward to hear from you. Thanks in advance.