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

Email format in the recipient email is incorrect

SA-64700

Summary



Clicking the 'Envoyer' (Send) button, an email is sent from the application.

For example, below is format of the sent email.




At the  recipient, the email displays as below.



The New  lines used, to format the email body, do not display. Hence, the email format displays incorrectly


Error Messages



Not Applicable


Steps to Reproduce



Click the 'Envoyer' (Send) button. An email is sent from the application.

Internally, the CorrNew activity is called with the below parameters:

Set Message to .pyInboundEmail.pyBody
Set PartyRole to ToReciepient
Set EmailSubject to .corrSubject
Set AttachmentCategoriesToSend to PieceJointeTransfer,File
Set CC_PartyRoles to ccReciepient




Root Cause



On a first approximation, the application works as designed; the body property is of type String and the control used to enter data is a Text control.
Hence, when the sample text is entered, it displayed (as below) as a Java String literal notation.

Hello\n\nThis is a test.\n\nRegards

When an HTML email was sent, the body of that email was as below.

<html>
<body>
<p>Hello

This is a test.

Regards</p>
</body>
</html
>

The line feeds are present, however, the email client does not display them because HTML ignores any whitespaces. Hence, the email sent displays incorrectly.


Resolution



Perform either of the following local-change:
  • Send emails PlainText Instead of HTML emails.
  • Use a RichText control instead of Text control for the email body.
  • Convert the plain text body to valid HTML (replacing the linefeed characters with '<br>' HTML sequences).
Suggest Edit

Published March 26, 2019 - Updated December 2, 2021

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

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