Troubleshooting: Images meant to be embedded in email correspondence do not display, appear as attachments
Your outbound email correspondence generated in a Pega application contains embedded images. But you notice that the images do not display as expected in the email HTML message body when it is opened in the email client application. Instead, the images that you embedded in the email message body are sent as file attachments. These images are always sent as file attachments, regardless of how they are specified. Using the alternative approach of embedding an image directly into the HTML stream causes problems with a larger number of email clients.
For example, create an email account in the Pega application for a recipient address at Google Mail (Gmail). Then create a Correspondence rule with an image embedded in it.
This problem has also been reported when Voltage encryption is enabled on outbound email correspondence. That is, when you set the email Header for outbound email from the Pega application to
content-disposition:inline, embedded images do not display in the body of the email message. When you turn off Voltage encryption, the images are displayed in the body of the email message as expected.
This problem is reported most frequently for Pega 7.1.7 or earlier releases when the correspondence is opened in Gmail. The issue is generally not seen with other email applications such as Yahoo, Microsoft Outlook, or IBM Lotus Notes.
Remember that embedded images display inline only for HTML or Rich Text. If you force text display, the images still display as file attachments, if they display at all.
Pega 7.1.7 and earlier releases interpreted a standard in a way that put Gmail at a disadvantage. These releases of the Pega 7 Platform cause outbound email correspondence to add images using the header
content-disposition:attachment instead of the header
You use the SendEmailNotification activity to send outbound email by calling the SendEmailMessage rule utility function (RUF). The standard approach is to use the Attachment page to set custom headers. However, despite the fact that
content-disposition:inline is specified, Pega sends the email HTML body with the header
The Pega email correspondence functionality does not provide the ability to override the
content-disposition setting in the email HTML body. While Microsoft Outlook has no problem displaying regular email messages with inline images, emails with the Sensitivity header are displayed without inline images because the
content-disposition:inline header is ignored. Furthermore, because the interpretation of email messages is unique to the particular email client application, this problem might manifest itself differently for different email applications.
If you are using Pega 7.1.7, apply HFix-28429.
After you install HFix-28429, ensure that the latest version of the SendEmailMessage function is used by the application:
Open the record, navigate to the Java tab, and click Generate library.
Pega 7.1.8, Pega 7.1.9, or Pega 7.2.1
Update or upgrade to Pega 7.2.2.
In this release and later releases, the rules have been updated to produce a more client-compatible outbound message (Correspondence).
No hotfixes will be developed for Pega 7.1.8, Pega 7.1.9, or Pega 7.2.1.
About HFix-28429 for Pega 7.1.7
A new PageList property pyInlineContent of type Embed-EmailAttachment has been added to the Data-EmailAttachments class. The SendEmailMessage rule utility function has been enhanced to detect when the new pyInlineContent property is populated. If the email message is formatted as HTML, the content in the list is given a disposition of
inline and packaged with the HTML body in a message part of type
multipart/related for proper consumption by email clients.
If the email message is not formatted as HTML, the
inline content will not be qualified as inline content; it appears as an attachment when the email message is opened.
SendEmailNotification in Pega-EventProcessing has been withdrawn and replaced with a new version of SendEmailNotification, which has an updated Prepare step (Step 2) that puts the data for images in HTML (Corr) into the new pyInlineContent property of the Email Attachments page (if such a page exists) so that SendEmailMessage can process them correctly.
If you install Pega 7.1.7 HFix-28429 or upgrade to Pega 7.2.2 or later release and you have custom logic in your application, update the custom logic to use the new property pyInlineContent. That is, if your application’s custom logic puts images on the pyAttachment property of the clipboard for the purpose of having images embedded in the email body, then update the custom logic to use pyInlineContent.