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

Attachment Names are corrupted when Sending Emails



On sending an email with an attachment such as "TestFile.txt" (the double quotes is part of the file name), the attachment name is corrupted. Hence, unable to open the attachment.

For example, 

Attachment name in the email: "TestFile.txt"

Displays in Outlook as: '__TestFile.txt__.dat'

Error Messages

Not Applicable

Steps to Reproduce

Send an email with an attachment from the Pega application.

Root Cause

When an email with an attachment is sent from the Pega application, the *.eml for that attachment is in the below format:

Content-Type: application/octet-stream; name="\"TestFile.txt\""
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="\"TestFile.txt\""


The valid format is as below,

Content-Type: application/octet-stream; name=TestFile.txt
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=TestFile.txt



Alternatively, the below format is also valid,

Content-Type: application/octet-stream; name="TestFile.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="TestFile.txt"



Apply HFix-47381.


Published October 10, 2018 - Updated December 2, 2021

Was this useful?

100% 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