Support Article
Image not sent as part of email body
SA-80846
Summary
When adding an image to the Rich Text Editor (RTE) containing special characters (for example, test(1).png), the image is not sent as part of email body. Instead, an 'X' icon displays in mail body.
Error Messages
Not Applicable
Steps to Reproduce
- Configure an email account.
- Add an RTE.
- Browse and upload an image which has special character (for example, test(1).png).
- Send the mail using the sendSimpleEmail out-of-the-box activity. BatchSend = true or BatchSend=False have the same result
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Perform the following local-change:
Modify the below code snippet,
if (fileExists) {
match.appendReplacement(updatedMarkup, "$1" + "$4" + "cid:" + originalURL.replaceAll(" ", "_") + "$8");
filesRefrernceSet.add (originalURL);
}
![](https://gcsprdsa.lab.pega.com/articles/datacontent/Image/rteImages/UserUpload_15553226291511555322630357.png)
to,
if (fileExists)
{
// match.appendReplacement(updatedMarkup, "$1" + "$4" + "cid:" + originalURL.replaceAll(" ","_") + "$8");
match.appendReplacement(updatedMarkup, "$1" + "$4" + "cid:");
updatedMarkup.append(originalURL.replaceAll(" ","_"));
updatedMarkup.append(match.group(8));
filesReferenceSet.add (originalURL);
}
Published August 15, 2019 - 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.