Table of Contents

How to send a meeting request to Outlook or a Vcalendar email client

Summary

The utility SendEmailMessage lets your application send email to any valid email address. It can also send meeting requests to any email client that supports the VCalendar format.

For another approach to sending meeting requests to Microsoft Outlook calendars, see Integrating with Outlook calendars.

Suggested Approach

To allow application users to send email messages or meeting requests, create an activity that sets the properties for the email message or meeting request and then calls the utility SendEmailMessage.

To create an activity:

  1. From the Rules Explorer, right-click Technical > Activity to display the context menu.
  2. Click the New icon. The New Rule Instance dialog box displays.
    zzz
  3. In the Activity Name field, enter the name for your activity and click Create.
  4. On the Pages & Classes tab, enter the page name "MessageData" and the class name Data-Corr-Email.
    zzz
  5. On the Steps tab, execute the Page-New method against the step page MessageData.
    zzz

Defining parameters and properties for email messages

  1. Define the required inbound parameters for email messages. On the Parameters tab, define the parameter names for the required email message properties that will be passed to the standard function SendEmailMessage. Define the parameters (set as required the parameters indicated. The In/Out setting is Infor all parameters):
    • SmtpHost (required)
    • FromUserID (required)
    • FromPassword (required)
    • UseSSL ( True or False)
    • From (required)
    • ToString (required -- allows for sending to one email or a comma-separated list of emails)
      [The following parameters relate to a meeting that the email may be proposing, and are optional]
    • MeetingStartDate ( DateTime)
    • MeetingEndDate ( Type DateTime)
    • MeetingLocation
    • MeetingOrganizer
    • MeetingDescription
    • MeetingSetReminder ( True or False)
      zzz
  2. You can also set optional inbound parametersfor email messages:
    • FromFullName
    • ReplyTo
    • CC
    • BCC (those listed receive "blind copies")
    • Priority
    • Subject
    • Body
      zzz
  3. On the Steps tab, set the required properties for email messages using the Property-Set method. Click the Expand Method Step icon and enter the following:
  • .pysmtpHost (Text) — the name of the SMTP host
  • .pyFromUserID (Text)— the user ID for the SMTP mail account sending the email
  • .pyFromPassword (Text)— the SMTP mail account password
  • .pyUseSSL (true/false)— a flag for sending encrypted mail using SMTPS
  • .pyFrom— the email (Text)— the email address of the message sender
  • .pyToString (Text)— a list of recipient addresses, separated by commas
    zzz

  • On the Steps tab set the optional properties for the email message using the Property-Set method. Click the Expand Method Stepicon and enter the following:
    • pyFromFullName— displays the name of message sender as it will appear in the recipient's inbox
    • pyReplyTo— the reply-to email address
    • pyCCString— lists the CC recipient addresses, separated by commas
    • pyBCCString— lists the BCC recipient addresses, separated by commas
    • pyPriority— used to set the priority of the email message. It can be set to "HIGH", "NORMAL", or "LOW". The default setting is "NORMAL"
    • pySubject— the subject of the email message
    • pyBody— the body of the email message
      zzz
  • Defining required parameters and properties for meeting requests

    1. On the Stepstab, set the required properties for meeting requests using the Property-Set method. Click the Expand Method Step icon and enter the following:
      • pyMeetingData.pyStartDate (DateTime)— sets the meeting start date and time
      • pyMeetingData.pyEndDate (DateTime)— sets the meeting end date and time
      • pyMeetingData.pyLocation (Text)— the location of the meeting
      • pyMeetingData.pyOrganizer (Text)— the email address of the meeting organizer
      • pyMeetingData.pyDescription (Text)— the description of the meeting
      • pyMeetingData.pySetReminder (true/false)— a flag for activating a pop-up reminder for meeting attendee
      • pyMeetingData.pyReminderTime (integer)— the number of minutes prior to the meeting for the pop-up reminder to display
        zzz

    Connecting to the SendEmailMessage function

    1. Create a local variable named status on the Parameters tab:
      local variable
    2. Add a step to the activity to call the SendEmailMessage function using the Property-Set method. Click the Expand Method Step icon and create a enter local.status in the ProperiesName fieldtand set its value to
      @(Pega-IntegrationEngine:Default).SendEmailMessage(MessageData):zzz
    3. Save the activity.

     

    Unit testing the activity

    To unit test this activity:

    1. Click the Run icon. The Run Rule popup window displays.
      zzz
    2. Enter appropriate values for all parameters, then click the Execute button to send the email message or meeting request.

    You can now add a utility shape to your flow that calls this activity and lets users send email messages and meeting requests. You could also add this activity to a flow action rule to run either before or after the action.

    Suggest Edit

    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.