Subscribe

UiPath Activities

The UiPath Activities Guide

Send Email

UiPath.Mail.Activities.Business.SendMailX

Sends an email from the specified email account. This activity must be added inside a Use Outlook 365, Use Gmail, or Use Desktop Outlook App activity.

To learn how to use this activity, see:

🚧

Note:

HTML emails may not look as expected when using the Use Desktop Outlook App activity. Using a Word document for the Body is recommended.

Configuring the Activity

In the Body of the Activity

  • Account - Click Plus plus buttonplus button on the right side of the field and then, from the drop-down menu, select an Outlook 365, Gmail, or desktop Outlook account added to the automation.
  • To - Click Plus plus buttonplus button on the right side of the field, and then use one of the options in the menu to select the recipient of the email:
    • Data from the Project Notebook, a parent Excel file or email account. For example, you can select a cell in an Excel file that contains email addresses separated by semicolon (;) to add multiple recipients, or, when automating the Outlook desktop app, use the email addresses from the To field of the email selected in Outlook when the project is executed.
    • Use Saved Value - Use data in the form of a list of email addresses that you previously saved for later use in the project.
    • Text - Enter one or more email addresses separated by semicolon (;) in the Text Builder.
    • Ask when run - Prompt for the recipients when the project is executed.
    • Paste from clipboard - Paste an email address that you previously copied to the clipboard in the project.
    • Open in Advanced Editor - Enter a VB expression.
  • Cc - Click Plus plus buttonplus button on the right side of the field, and then use one of the options in the menu to select the secondary recipients of the email:
    • Data from the Project Notebook, a parent Excel file or email account. For example, you can select a cell in Excel with email addresses separated by semicolon (;) to add multiple recipients, or, when automating the Outlook desktop app, use the email addresses from the Cc field of the email selected in Outlook when the project is executed.
    • Use Saved Value - Use data in the form of a list of email addresses that you previously saved for later use in the project.
    • Text - Enter one or more email addresses separated by semicolon (;) in the Text Builder.
    • Ask when run - Prompt for the recipients when the project is executed.
    • Paste from clipboard - Paste an email address that you previously copied to the clipboard in the project.
    • Open in Advanced Editor - Enter a VB expression.
  • Subject - Click Plus plus buttonplus button on the right side of the field and then, from the menu, add a subject for the email:
    • Data from the Project Notebook, a parent Excel file or email account. For example, you can select a cell in an Excel file, or, when automating the Outlook desktop app, you can use the subject of the of the email selected in Outlook when the project is executed.
    • Use Saved Value - Use data that you previously saved for later use in the project.
    • Text - Enter a subject in the Text Builder.
    • Ask when run - Prompt for the subject when the project is executed.
    • Paste from clipboard - Paste a value that you previously copied to the clipboard in the project.
    • Open in Advanced Editor - Enter a VB expression.
  • Body - You can add a plain text body, use HTML, or select a Word document to add the file in the email body.
    • If you select HTML, click Open Editor to start drafting your email using the WYSIWYG HTML editor.
    • If you select Text, click Plus plus buttonplus button on the right side of the field, and then select one of the options from the menu to add the text for the body of the email:
      • Data from the Project Notebook, a parent Excel file or email account.
      • Use Saved Value - Use data that you previously saved for later use in the project.
      • Text - Enter the body text in the Text Builder.
      • Ask when run - Prompt for the body text when the project is executed.
      • Paste from clipboard - Paste a value that you previously copied to the clipboard in the project.
      • Open in Advanced Editor - Enter a VB expression.
    • If you select Use Word Document, indicate a Word document with tables, images. text formatting to add in the body. The email body is formatted as HTML.
      Click Browse browse filesbrowse files next to the field, and then browse to a Word file and select it. Alternatively, you can indicate the path to a Word file by selecting an option from the Plus plus buttonplus button menu on the right side of the field:
      • Data from the Project Notebook, a parent Excel file or email account. For example, you can select a cell in an Excel file that contains a path.
      • Use Saved Value - Use data in the form of a file path that you previously saved for later use in the project.
      • Text - Enter a path in the Text Builder.
      • Ask when run - Prompt for the path when the project is executed.
      • Paste from clipboard - Paste a value that you previously copied to the clipboard in the project.
      • Open in Advanced Editor - Enter a VB expression.

📘

Note

The option Use Word Document can only be used with the Use Desktop Outlook App activity.

  • Save as draft - If selected, the email is saved in the Drafts folder instead of being sent directly to the selected recipients, giving you a chance to check the email before sending it. This option is selected by default.
  • Attachments - Select Files to attach individual files or Folder to attach all the files in a folder.
    To select the file or folder, click Browse browse filesbrowse files next to the field, and then browse to the file or folder and select it. Alternatively, you can indicate a file or folder path by selecting an option from the Plus plus buttonplus button menu on the right side of the field:
    • Data from the Project Notebook, a parent Excel file or email account. For example, you can select a cell in an Excel file that contains a path.
    • Use Saved Value - Use data in the form of a path that you previously saved for later use in the project.
    • Text - Enter a path in the Text Builder. You can combine text with a formula from an Excel file cell, for example to add a date to the file name using formulas in the Project Notebook.
    • Ask when run - Prompt for the path when the project is executed.
    • Paste from clipboard - Paste a value in the form of a path that you previously copied to the clipboard in the project.
    • Open in Advanced Editor - Enter a VB expression.

In the Properties Panel

Common

  • DisplayName - The name displayed for the activity in the Designer panel.

Email

  • Body - The plain text body of the email, if Use document as body is not selected.
  • Body document path - The path to the Word document to use as the body of the email, if Use document as body is selected.
  • Subject - See Subject in the body of the activity.

Input

Misc

  • Private - If selected, the data used in the activity is not logged by StudioX.

Options

  • Body type - See Body in the body of the activity.

  • HTML body from file - Specifies the HTML body of the email created using the HTML editor.

  • HTML Template - Document which stores the HTML template. When blank, a new template will automatically be created when you use the editor.

  • HTML body from text - Specifies the HTML body of the email loaded from a different source and saved as text.

  • Importance - How important is the email:

    • Low
    • Normal
    • High
  • Max body document size - The maximum size (in MB) a Word document can have to be used as the email body. The default value is 2MB.

  • ReplyTo - The email addresses to be used when replying to this email.

  • Save as draft - See Save as draft in the body of the activity.

  • Sensitivity - The sensitivity of the email:

    • Normal
    • Personal
    • Private
    • Confidential

    :information-source: Note: The Sensitivity property does not apply to Gmail.

Receiver

Updated 3 months ago


Send Email


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.