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 Listener Sets Content of .txt attachment to pyBody



When consuming emails, the contents of .txt attachments are being applied to the pyBody property instead of the actual email contents.

Error Messages

Not applicable

Steps to Reproduce

Make email listener consume email with a .txt file attachment.

Root Cause

An issue in the custom application code or rules.

The service email rule was configured to map the email body to the pyBody property on the Request tab.

However, it was also set to prefer text over the HTML content in the email. Because of this, when .txt files are present in the email, the contents of those files replaces the html content for pyBody.


Perform the following local-change:

In the Service Email rule, on the Request Tab in the Message Data section, change the “Handle html content” drop down to “Inline – prefer html”.

Suggest Edit

Published April 24, 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