Free Support Forum - aspose.com

The ContentID cannot contain a '<' or '>' character

I am trying to convert some PSTs to EML with the sample code available on the website. Although; during export an exception occurs and stops processing.

I put a try-catch inside the foreach to check if the export continues; its continues; however some emails were not exported due to the problem.

Is it a possible bug in the library? Is it possible to parameterize the export so that the library can make the character conversions that are necessary automatically?

using (var pst = PersonalStorage.FromFile("SourceFile.pst")){
int i = 0;
foreach (FolderInfo folder in pst.RootFolder.GetSubFolders()){
	foreach (var msg in folder.EnumerateMapiMessages()){
			msg.Save("outputMessage" + i++ + ".eml", SaveOptions.DefaultEml);
	}
}
} 

Exception (The ContentID cannot contain a ‘<’ or ‘>’ character)

Sample in attachment

PstToEml_ErrorDetails.png (36.4 KB)

@ssoliveira
Welcome to our community! Thank you for the issue description. Could you share a PST file sample that can be used for investigating the problem, please?

Hello good afternoon.

Unfortunately I cannot share; we have about 12 psts that we are working on; that have confidential data from financial institutions.

From what we verify; there are some emails that present this problem; but we were unable to identify what they are; because pst opens normally in outlook. We suspect that they are automatic response emails; or meeting schedules. We were unable to validate this.

I’ll run the code again and try to get the class that generates the exception.

@ssoliveira
We will be waiting for new details from you. You can try to remove all confidential data from the file. You can also send the file as a private message.

I was able to isolate a message in the PST that generates Exception for export. It is inside the attached file that I made available via Private Message.

@ssoliveira
Thank you for the PST file sample. I have reproduced the problem and got the same results. I have logged the issue in our tracking system with ID EMAILNET-40115. Our development team will investigate it. You will be notified when it is fixed.

@ssoliveira

I will find out if it is possible to do the character conversion automatically and answer you.

Hi; Good Morning Andrey.

Thanks; i need to export a large amount of psts; if possible ask for priority in this case please. Thank you for your help

@ssoliveira
We try our best to serve our customers in the best possible way, and to achieve that, we try to resolve issues on a first come first serve basis, and that’s why it might not be feasible to further prioritize this issue at the moment.
However, if you want to further escalate and prioritize your issue based on the urgency at your end, I would suggest you to consider our Paid Support option, which has a separate priority queue.