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

SendEmailMessage does not send Outlook calendar invite

SA-3256

Summary



User has reported an issue while integrating PRPC with MS Outlook calendar. Users were unable to send the meeting invites through PRPC function 'SendEmailMessage'. PRPC is unable to attach the calendar in the emails being sent out.
 
User has followed the steps mentioned on the PDN article https://pdn.pega.com/correspondence/how-to-send-a-meeting-request-to-outlook-or-a-vcalendar-email-client  

Error Messages



No error message on the screen, tracer or in the PegaRULES log files.

Steps to Reproduce



Refer instructions mentioned on the PDN -
https://pdn.pega.com/correspondence/integrating-with-outlook-calendars
https://pdn.pega.com/correspondence/how-to-send-a-meeting-request-to-outlook-or-a-vcalendar-email-client

Root Cause



The 'SendEmailMessage' function implementation in Pega-IntegrationEngine:06-02-25, has capabilities to send email and it does not handle iCalendar meeting requests. Additionally, user has requirements that attendees who receives the meeting invite, they should get the options (Edit the Response before Sending, Send the Response Now, Do Not Send a Response) similar to the options when similar meeting invite is sent directly from MS Outlook.

Resolution



Following local change has been suggested to user which helps meet the requirements.
 

1) Create a Text mode Property by name "pyAttendee", applies to Data-Email-MeetingRequest" class
2) In FUNCTION Default • SendEmailMessage, uncomment the "Handle iCalendar meeting requests" part of code

 
                 /* Handle iCalendar meeting requests
                ClipboardProperty meetingDataRef = MessageData.getProperty("pyMeetingData");
                if (!meetingDataRef.isEmpty())
                {
                                // Add a header for the 

                                message.addHeader("component", "VEVENT");

                                // Format the meeting data into a string
                                String meetingData = FormatMeetingRequest(meetingDataRef.getPageValue());
                                MimeBodyPart meetingPart = new MimeBodyPart();
                                meetingPart.setDataHandler(new DataHandler(
                                new javax.mail.util.ByteArrayDataSource(meetingData, "text/calendar")));
                                multipart.addBodyPart(meetingPart);
                }

                */


3) In FUNCTION Default • FormatMeetingRequest , add following code snippet in "Extract meeting request values" part of code
              String attendee = MeetingRequestData.getString("pyAttendee");



4) In FUNCTION Default • FormatMeetingRequest , add the below statement after BEGIN:VEVENT and before DTSTART part of code which appends string values to a buffer. 
              + "ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:" + attendee + "\n"
Note: this piece of code need to be repeated for sending the meeting invite to multiple attendees.

5) Set pyAttendee property value while invoking the SendEmailMessage RUF for sending a meeting request.

 
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

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.

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