Support Article
Attachment Names are corrupted when Sending Emails
SA-65783
Summary
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:
…
------=_Part_266_1222289546.1536682503220
Content-Type: application/octet-stream; name="\"TestFile.txt\""
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="\"TestFile.txt\""
TEST FILE
------=_Part_266_1222289546.1536682503220--
The valid format is as below,
…
------=_Part_266_1222289546.1536682503220
Content-Type: application/octet-stream; name=TestFile.txt
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=TestFile.txt
TEST FILE
------=_Part_266_1222289546.1536682503220--
Alternatively, the below format is also valid,
…
------=_Part_266_1222289546.1536682503220
Content-Type: application/octet-stream; name="TestFile.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="TestFile.txt"
TEST FILE
------=_Part_266_1222289546.1536682503220--
Resolution
Apply HFix-47381.
Published October 10, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.