Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

Attachment name is getting change in outlook

$
0
0
Dear Team,

I have taken demo license for Developer OEM(i.e 30 days trial license) and wrote some code to add the .eml file to pst folder but when we open that pst in outlook mails attachment name is getting change to att0001, att0002, etc.

Below is a piece of code, i'm using to do the same:

//Create an instance of PersonalStorage
PersonalStorage pst = PersonalStorage.create(args[2], FileFormatVersion.Unicode);

//Create a folder at root of pst
FolderInfo folder = pst.getRootFolder().addSubFolder("Data");

MailMessage msg = MailMessage.load('/tmp/472f9d57dec725185093593baf4876e4.eml', MessageFormat.getEml());

// Creating msg object for outlook
MapiMessage mapi = MapiMessage.fromMailMessage(msg, OutlookMessageFormat.Unicode, true);

// Adding messages to pst
folder.addMessage(mapi);



Regards,
Wasil.

Viewing all articles
Browse latest Browse all 1367

Trending Articles