We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Attachment (image/icon) is not read/extracted from EML files

We are using Aspose for extracting attachments and embedded objects from EML files.
Aspose not extracting certain types of images from EML files.
If an EML file contains an image which is directly not visible. Some times we are asked to righ-click and click download picture to view the image. In this case this image is not getting extracted.

@hassan.khan,

I have observed the issue shared by you and request you to please share the source file along with used sample code along with information which information the API failed to extract on your end.

Below is the code snippet we used:
MailMessage msg = MailMessage.load(filePath.toString());

        for (int i = 0; i < msg.getAttachments().size(); i++) {
			Attachment attachment = msg.getAttachments().get_Item(i);
		}
		
		for (int i = 0; i < msg.getLinkedResources().size(); i++) {
            LinkedResource linkedResource = msg.getLinkedResources().get_Item(i);
        }
	    // In both the above cases aspose is not identifying images.

Attached is the file with an image, if you open the EML file you see the image says right-click and download. This image is not read by Aspose.

Note: The target file to be tested is an EML file inside the zip file, i was not able to upload EML file so i zipped the EML file and uploaded the zip file.

aspose_bugs_docs.zip (10.7 KB)

@hassan.khan,

I have worked with EML file shared and have opened in MS Outlook. Even, MS Outlook fails to download the file. It is not there embed inside file, the API can’t download it. Similarly in another thread, you have shared an EML file where attachments are embedded inside and API is able to extract them despite other file size issue.