How to send a meeting request to Outlook or a Vcalendar email client
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.
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:
- From the Rules Explorer, right-click Technical > Activity to display the context menu.
- Click the New icon. The New Rule Instance dialog box displays.
- In the Activity Name field, enter the name for your activity and click Create.
- On the Pages & Classes tab, enter the page name "MessageData" and the class name Data-Corr-Email.
- On the Steps tab, execute the Page-New method against the step page MessageData.
Defining parameters and properties for email messages
- 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)
- MeetingSetReminder ( True or False)
- You can also set optional inbound parametersfor email messages:
- BCC (those listed receive "blind copies")
- 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
- 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
Defining required parameters and properties for meeting requests
- 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
Connecting to the SendEmailMessage function
- Create a local variable named status on the Parameters tab:
- 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
- Save the activity.
Unit testing the activity
To unit test this activity:
- Click the Run icon. The Run Rule popup window displays.
- 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.