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

Email Body not getting mapped to Clipboard Property

SA-41985

Summary



Configure an application that uses email listeners for work flow process and where the Service Email Rule is configured to map both the request email body and the email subject to clipboard properties.

While the subject is mapped value correctly, no data is added to the property meant for the email body. The incoming email is in HTML format.


Error Messages



2017-08-04 12:05:31,571 [ EMAIL-Thread-28] [ STANDARD] [ ] [ your_app:05.37] ( mapping.xml.XMLParserBase) ERROR EMAIL.Your_EmailListener.Listener|from([email protected]_domain.com)|sub(Re: YOUR_WORK)|Email|Your_service|EMAIL|your_serviceActivity|AD046CAAC21652F1752F597640C4AADFE your_name - Caught exception parsing XML stream
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.


Steps to Reproduce

  1. Configure Service Email to 'Handle HTML Content' under Request Tab tp 'Inline-Prefer Text'
  2. Send an email with an HTML format to the email account
  3. Use Apply-Parse-XML Method for parsing the email body property
  4. Trace the Listener and note that the text content does not map to the Clipboard Property


Root Cause



Turn debug on 'com.pega.pegarules.integration.engine.internal.services.email' package to understand the internals of EmailListener.

'Inline-Prefer Text' setting results in 'Email Listener' Discarding HTML content in favor of plain text version of the content. Since the HTML Email body is parsed and read as a filenotification :
<body>
<filenotification>
<filename>/your_dir/your_file.pdf</filename>
<account>[email protected]_domain.com</account>
<channel>web</channel>
</filenotification>
</body>

'No email content found' by the Listener and hence the Body property gets no value.

Thus Apply-Parse-XML Method fails.

Resolution



Perform the following local-change: Change 'Handle HTML Content' under Service Email Request tab to Inline - Prefer HTML.
Please note, that this will require a JVM restart.
Suggest Edit

Published August 26, 2017 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

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