Connect to Microsoft Outlook
Establishes a connection with the web Microsoft™ Outlook email server.
Command availability: IBM RPA SaaS and IBM RPA on premises
Description
Establishes a connection with the web Microsoft™ Outlook email server by using a connection added to the Microsoft™ Outlook Email application.
Script syntax
IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.
microsoftMailConnect --connection(String)
Dependencies
- You need a valid connection added to the Microsoft™ Outlook Email application in the IBM RPA Control Center. See the Adding connections to an application topic for more instructions.
- This command works only with the Microsoft™ Outlook Email application.
Input parameters
The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.
Designer mode label | Script mode name | Required | Accepted variable types | Description |
---|---|---|---|---|
Connection | connection |
Required |
Text |
The connection created in the IBM RPA Control Center. |
Output parameters
Designer mode label | Script mode name | Accepted variable types | Description |
---|---|---|---|
Connection | value |
Email Connection |
Variable that stores the collection of messages from the account's email boxes. |
Example
The following code example demonstrates how to send an email by using Microsoft™ Outlook.
defVar --name emailConnection --type EmailConnection
defVar --name "receiveremail--type" --innertype String --value "[email@email.com]" List
microsoftMailConnect --connection connection_technical_name emailConnection=value
emailSend --connection ${emailConnection} --to ${receiverEmail} --from "useremail@outlook.com" --bodytype "Text" --body "Message body"
emailDisconnect --connection ${emailConnection}
// Sends an email using Microsoft Outlook and terminates the connection to the server.