EMLX File Challenges

Problem 1.

When processing “.emlx” files, some files appear to have multiple copies of attachments. When attachments appear more than once, only the last instances seems to be valid.

If I open the same file in a mail program, it only shows one copy of each attachment.

My questions are

  1. Is this a known problem?

  2. Is there a recommended work-around?

  3. Is skipping all but the last copy of an attachment safe?

I’m attaching a sample program that demonstrates the problem along with sample .emlx files.

Problem 2.

I’m also struggling with .emlx files that come from Apple’s mail program in Lion and Mt Lion. A number of these files have a secondary extension on them. For example,

123456.parital.emlx

These are “.emlx” files and the aspose.email library can open it, but all is not right. Files of this form are accompanied by one or more secondary files with names in the form:

123456.N.emlxpart

Where “N” is an attachment number.

According to my reading of various comments on the web and Apple’s naming of the file in the Finder, the “.emlxpart” files are attachments. I find that the “.partial.emlx” file is missing one attachment for each of the “.emlxpart” files that appear. When I try to open the attachment Attachment.getContentStream(), I get a stream, but no bytes are available.

The same sample program demonstrates the problems with these kinds of files.

Summary of Attachments

  1. MailProcessingTest.java (An application that has you choose a mail file to open. Once open, the application prints some header information along with the names of all attachments and the body of the eMail. It ends by saving each attachment to disk in its own file.)

  2. Duplicate Attachments Folder (Three .emlx files which have the problem.)

  3. Partial EMLX Folder (Three .partial.emlx files with their emlxpart pieces.)

Hi Steven,


Thank you for using Aspose.Email and please accept our apology for delayed response.

We are currently investigating the issues you have mentioned and appreciate your patience in this regard. We will soon update you about our findings and share any work around if available. We are sorry for the inconvenience you have faced.

Hi Steven,

Thank you for being patient while we were investigating the issue at our end.

Problem 1.

When processing “.emlx” files, some files appear to have multiple copies of attachments. When attachments appear more than once, only the last instances seems to be valid.

If I open the same file in a mail program, it only shows one copy of each attachment.

I’m attaching a sample program that demonstrates the problem along with sample .emlx files.

I was able to observe this issue with the latest version of Aspose.Email for Java 2.0.0. The attachments in the provided EMLX files are duplicated when processed with the Aspose.Email API. Well, this seems to me some sort of malfunctioning and needs to be investigated further. I have forwarded these details, along with the provided EMLX files from the “2-Duplicate Attachments Folder”, to our development team to investigate this issue and assist further.

Well, we are not sure if the last copy of attachments will always be a good one and considered safe, as this needs more testing with a number of files. Anyways, I have logged this issue for investigation as: NETWRKJAVA-33188 in our issue tracking system and will update you here once we have any information in this regard.

Problem 2.

I’m also struggling with .emlx files that come from Apple’s mail program in Lion and Mt Lion. A number of these files have a secondary extension on them. For example,

123456.parital.emlx

These are “.emlx” files and the aspose.email library can open it, but all is not right. Files of this form are accompanied by one or more secondary files with names in the form:

123456.N.emlxpart

Where “N” is an attachment number.

According to my reading of various comments on the web and Apple’s naming of the file in the Finder, the “.emlxpart” files are attachments. I find that the “.partial.emlx” file is missing one attachment for each of the “.emlxpart” files that appear. When I try to open the attachment Attachment.getContentStream(), I get a stream, but no bytes are available.

The same sample program demonstrates the problems with these kinds of files.

While further analyzing the issue of empty stream, I tried to open your provided *.partial.Emlx files and observe their contents. The image attachments in the two files, 163494.partial.emlx and 161120.partial.emlx, are of much smaller size and can’t be displayed by image viewer and I doubt if these attachments have been attached properly or not. Regarding the third sample 161058.partial.emlx, the issue of duplicate attachment also exists along with ContentStream of some of these attachments as empty. Can you please confirm us if the attachments in these three files are proper and let us know their sizes? We will investigate this issue further and assist you as soon as possible.

The issues you have found earlier (filed as NETWRKJAVA-33188) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi team,
i am coverting eml to emlx , but when i am saving it to emlx but it shows an exception :
xception in thread “main” class com.aspose.email.system.exceptions.ArgumentNullException: Value cannot be null.
Parameter name: boundary
Sample eml file : New folder.zip (433.4 KB)

@pradeepnegi,

I have observed the stack trace shared by you and suggest you to please try using latest Aspose.Email for Java 19.3 on your end. If there is still an issue then please provide the used sample code along with Java and Operating system details on your end.

I have checked your website but there is no link for aspose.Email 19.3 for java.

@pradeepnegi,

I like to inform that Aspose.Slides for Java 19.3 will be released today. I request for your patience. We will share good news with you soon. To investigation your issue please share source file along with sample code so that we may help you out.

I have checked eml file with aspose.Email 19.3 but the issue is the same.

@pradeepnegi,

Please share the used sample code along with Java and Operating System details with us. We will be able to log the issue in our issue tracking system once we have the requested information.

import com.aspose.email.EmlSaveOptions;
import com.aspose.email.MailMessage;
import com.aspose.email.MailMessageSaveType;

public class Eml2Emlx {

public static void main(String[] args) 
{
	//TODO Auto-generated method stub
	MailMessage eml = MailMessage.load("C:\\Users\\DELL\\Desktop\\Export.eml");
	
	System.out.println(eml.getSubject());
	EmlSaveOptions options = new EmlSaveOptions(MailMessageSaveType.getEmlxFormat());
	
	eml.save("C:\\Users\\DELL\\Desktop\\task1.emlx", options);
	
}

}

Jdk version 1.8
Operatig system win 10

Exception :

Exception in thread “main” class com.aspose.email.system.exceptions.ArgumentNullException: Value cannot be null.
Parameter name: boundary
com.aspose.email.ako.(SourceFile:65)
com.aspose.email.ako.(SourceFile:54)
com.aspose.email.akf.a(SourceFile:155)
com.aspose.email.akf.a(SourceFile:160)
com.aspose.email.aiu.a(SourceFile:778)
com.aspose.email.MailMessage.a(SourceFile:3040)
com.aspose.email.MailMessage.a(SourceFile:2116)
com.aspose.email.MailMessage.a(SourceFile:1998)
com.aspose.email.MailMessage.save(SourceFile:1951)
Eml2Emlx.main(Eml2Emlx.java:15)
at com.aspose.email.ako.(SourceFile:65)
at com.aspose.email.ako.(SourceFile:54)
at com.aspose.email.akf.a(SourceFile:155)
at com.aspose.email.akf.a(SourceFile:160)
at com.aspose.email.aiu.a(SourceFile:778)
at com.aspose.email.MailMessage.a(SourceFile:3040)
at com.aspose.email.MailMessage.a(SourceFile:2116)
at com.aspose.email.MailMessage.a(SourceFile:1998)
at com.aspose.email.MailMessage.save(SourceFile:1951)
at Eml2Emlx.main(Eml2Emlx.java:15)

@pradeepnegi,

Thank you for sharing the information. I have been able to observe the issue. An issue with ID EMAILJAVA-34521 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.