Free Support Forum - aspose.com

Can we add EML to PST?

Hi,

Is it possible to add EML directly to PST?

Hi Aaron,


Thank you for your inquiry.

At present, there is significant difference between the structures of EML and MSG formats and this can’t be achieved as PST only accepts MapiMessage format data. This needs the MailMessage conversion methods and require time to be implemented. We have a ticket with id: EMAILNET-34123 that is based on the same requirement and work is in progress for implementation of it. We shall share the fix version information here with you as soon as it is available for download.

<span style=“font-size:12.0pt;line-height:115%;
font-family:“Candara”,“sans-serif”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:
minor-latin;mso-bidi-font-family:“Times New Roman”;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>I
found solution to add EML files into PST format. https://goo.gl/7uQIp2

Hi Amelie,


That certainly adds the EMLs to PST, but you need to have MS Outlook installed and the process is manual. When there is automation required via an application, Aspose.Email API is handful. You can use the API to develop applications that can load EML files from disc, convert to MapiMessage and add to PST. However, adding EML files directly to the PST is not possible at the moment as we have shared earlier in this post. Please feel free to write to us if you have any further query about this requirement.

Hi Waqas

Is there any news about this?

@AaronShameel,

The feature is still pending for implementation due to the complexity involved. We’ll notify you here once the fix version is available for download.

can we pass the path of a folder in a pst file and it generate the folder hierarchy accordingly to the passed in the funcion in java…

@pradeepnegi,

Thank you for contacting Aspose Support.
Please share additional details regarding your requirements so that we can assist you further.

Is there any method in java email so that i can create folder hierarchy in pst.
for ex: I have folder hierarchy in string form like this, Inbox/a,Inbox/b,Inbox/c , a/b,a/c.
where “Inbox” is the parent of “a”,“b”,“c” and “a” has child named as “b” so on…

@pradeepnegi,

You may achieve this by using the code snippet given below.

FolderInfo rootFolder = personalStorage.getRootFolder();
rootFolder.addSubFolder("Inbox").addSubFolder("a").addSubFolder("b");
FolderInfo inbox = rootFolder.getSubFolder("Inbox");
inbox.addSubFolder("b");
inbox.addSubFolder("c");
inbox.getSubFolder("a").addSubFolder("c");

Moreover, we have logged a new feature request as EMAILJAVA-34454 for adding subfolders in PST using string notation. We will update you here as soon as additional information is available.

if have an array like this [root, a,b,c] and i want to create subfolders like this : root/a/b/c , how could i do this by using given code.

@pradeepnegi,

Please use the code snippet given below to generate the desired subfolders.

String[] folders = new String[]{"root", "a","b","c"};
FolderInfo selectedFolder = personalStorage.getRootFolder();

for(String folder : folders){
    selectedFolder = createFolder(selectedFolder, folder);
}

private static FolderInfo createFolder(FolderInfo Folder, String newFolder) {
        Folder.addSubFolder(newFolder);
        return Folder.getSubFolder(newFolder);
    }

We hope that this answered your question. Please feel free to reach us if additional information is required.

The issues you have found earlier (filed as EMAILJAVA-34454) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by muhammadahmad