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

Free Support Forum - aspose.com

Attachment is not proper in PST Using Aspose.Email for JAVA API

Hello Team,


I have to convert MBOX file into PST file. But after conversion .EML attachment is showing as .MSG attachment. I have a source as MBOX which contains EML as attachment and I have to convert MBOX into PST. I am working on Mac OS X with Java Language. Please refer below code and source file attachment to verify issue.

******** Source Code *******

MboxrdStorageReader objMBOXReader = null;

MapiMessage f_objMapiMessage = null;


try
{

objMBOXReader = new MboxrdStorageReader(this.m_StrSourceFilePath, true);


int f_intMailCount = 0;


while ((f_objMailMessage = objMBOXReader.readNextMessage()) != null //iterate mails

{

try

{

f_intMailCount++;

f_objMapiMessage= MapiMessage.fromMailMessage(f_objMailMessage);


f_Inboxfolder = f_ObjPersonalStorage.getRootFolder().getSubFolder(“Mails”);


f_Inboxfolder.addMessage(f_objMailMessage);

}

catch(Exception pObj)

{

pObj.printStackTrace();

}


}//end of while loop




}//end of outer try

catch(Exception pObj)

{

pObj.printStackTrace();

}

Hi Ajinath,


Thank you for writing to Aspose support team.

We have logged the difference in attachment type in our issue tracking system for further investigation by our Product team. We’ll update you here once there is more information or a fix version available in this regard.

Hello Kashif,

You are not given me aspose issue ID like this :-“This issue has been logged as EMAILJAVA-34269 for further investigation by our Product team.”. If you possible please give us issue ID for later discussion.

Hello Kashif,


What about this issue. Give us solution for this issue I have purchase Aspose License. I have waste more time on it. Give us quick replay.

Hi,


We’ll soon share the ticket id with you for this issue. It will take some time for our Product team to investigate the issue upon its turn, after which we’ll be able to share some information with you. We’ll update you here once there is some information available in this regard.

Hi Ajinath,


Ticket id for the issue we found with this specific case if EMAILJAVA-34270 for your reference. We’ll update you here once there is further information available in this regard.

Hi Ajinath,


This is to update you about EMAILJAVA-34270. The MapiMessage.FromMailMessage converts the attachment EML to MSG by default. If you want to preserve the original format of embedded EML attachment, please use the MapiConversionOptions in fromMailMessage method as shown below. Please try it at your end and let us know your feedback.

Sample Code

MapiConversionOptions co = new MapiConversionOptions();
co.setPreserveEmbeddedMessageFormat(true);
MapiMessage convertedMsg = MapiMessage.fromMailMessage(message, co);