Support Article
Email body contains attachments names
SA-45850
Summary
User is copying the inbound email body to a property in a case. If the incoming email contains attachments, then the property contains email body along with attachment names.
Example, Inbound email body contains "Testing for SR" and has attachments with it (Testing.xlsx), then the property value will be:
Testing for SR
-------------------------------------
Attachments: Testing.xlsx
Error Messages
Not Applicable
Steps to Reproduce
1. Set up email listener configuration by configuring an email account.
2. Send an email to above email with attachments.
Pega email listener reads the email and copied the body value to pyBody property. This value contains attachment names.
Root Cause
This issue was determined to be an expected behavior for current release.
Resolution
Perform the following local-change:
Use below code in the service activity to strip the attachment information from pyBody:
String SPACER = "\n\n\n-----------------------------------------------------------------\n";
String EMBEDDED_CONTENT_INIT = SPACER + "Attachments: ";
pyBody.substring(0,pyBody.indexOf(EMBEDDED_CONTENT_INIT)-1));
Published October 26, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.