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

Issues with default SendEmailMessage function



"SendEmailMessage" function is used to send a meeting invite from PRPC application. The "SendEmailMessage" function takes a page of "Data-Corr-Email", where the meeting descriptions are saved in a Page property pyMeetingData. The pyMeetingData has properties defined to send meeting invite. The page of "pyMeetingData" is passed to "FormatMeeingRequest" function, which prepares the ".ics" file required for meeting invite. The "SendEmailMessage" function is compatible to support most of the Email client including Outlook client. When the meeting request is received at the client end, the client is expected to save the meeting invite in their corresponding calendar. 

The customer is using "SendEmailMessage" to send calendar invite from Pega7 application to Outlook Client. These are the below issues as reported by the customer.

When "SendEmailMessage" function prepares email body using ".pyBody" property, and the value of this property is used as the email content (body). And meeting description is passed in ".pyMeetingData.pyDescription" which is expected to be seen when the meeting invite is opened. The issue is, when meeting invite at email client is opened from the calendar, it only shows the content of the email but not the meeting description. That is ".pyBody" is seen while meeting invite is opened from the calendar and it does not contain the ".pyMeetingData.pyDescription".

Another issue is, the meeting invite only shows the email id from which the invite has come and not the name of the person who sent it.

Error Messages

No error message.

Steps to Reproduce

Create an activity and call function "SendEmailMessage" passing Page property of type "Email-Corr-Email", with all the properties set.


The reported behavior is because the function SendEmailMessage not having the code to address the issue.

  • The code for SendEmailMessage defines the body of the mail in a HTML format using .pyBody and do not consider if the email body has to append meeting description or not.
  • The function FormatMeetingRequest does not append organizer's name with the meeting invite. And only sends the meeting invite with MailTo option.


As per the understanding, the function SendEmailMessage only supports the minimum requirement for sending the calendar invite. For any email client to register a meeting invite in their respective calendar, it needs the email id of the organizer so that a reply can be sent to the meeting organizer. The same holds for the other issue as well. Some clients, open the ics file and reads it to append the Email body and the description set in the calendar event.

This issue is resolved through the local code changes:-
  • Meeting description not appended in the body of the mail.
Add the following code to SendEmailMessage function, just before creating the email content (at line number: 217):
final ClipboardProperty meetingDataRef = MessageData.getProperty("pyMeetingData");
if (!meetingDataRef.isEmpty())
msgBodyText += meetingDataRef.getString("pyDescription");
This insures, that if the meeting invite is there with email, it will append the meeting description to the body of the email.
  • Name of the organizer is not seen on the client's calendar for the meeting invite, and only the email id is observed.
The function FormatMeetingRequest is designed to create a meeting invite to support the minimum pre-requisites value. The function FormatMeetingRequest is available RULE, and hence can be restructured to support the use case.
  1. Use the app explorer and go to Data-Email-MeetingRequest class.
  2. Create a custom property within the Data-Email-MeetingRequest class named, "OrganizerName".
  3. Set the property value "OrganizerName" to .pyFromFullName in SendEmailMessage function at Line Number: 338

  4. Get the value of "OrganizerName" in FormatMeetingRequest function.

  5. Add the organizer name to the meeting request string:

This will set the Organizer's name as per the ics file standard format.

Published August 31, 2015 - Updated October 8, 2020

Was this useful?

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