Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Parsing .EMT(Email) File to the RTE is getting unnecessary tags



Customer is using Exchange server 2010 SP2
Customer is attaching an e-mail to the work object and showing it in the RTE (Rich Text Editor). Before showing it in the RTE, they are parsing the email content which is attached to the work object. When parsing with HTML they are seeing unnecessary tags in the RTE

Error Messages


Steps to Reproduce

1. Create a work object
2. Save any Email to you desktop and attach to the work object
3. parse the email which is attached to the work object and made that content available to RTE

Root Cause

This issue is because of Microsoft using a proprietary format for its email(.eml) files. This is not a Pega issue and the problem domain is outside and not limited to Pega. Pega cannot provide a full EML to HTML converter as the EML format is owned by Microsoft and is not an open standard with published rules.


In order to unblock the customer and provide a workaroubd for the particular usecase(single EML file), we are suggesting a local change which involves using regular expressions to filter out unwanted EML tags.

Local change provided only for the particular email attached. Note that the EML format is not completely understood by us and this local change may not resolve all issues.

Please add the following piece of code in a Java step of the email processing activity:
String emailContent = myStepPage.getProperty("pyNote").getStringValue();

/* Regular expressions to fix known EML quirks */
emailContent = emailContent.replaceAll("=[\\n\\r]+", "");
emailContent = emailContent.replaceAll("<o:p>", "");
emailContent = emailContent.replaceAll("<\\/o:p>", "");
emailContent = emailContent.replaceAll("=3D", "=");
emailContent = emailContent.replaceAll("=B7", ".");



Published July 8, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us