Send SMTP Email
UiPath.Mail.SMTP.Activities.SendMail
Description
Sends an email message by using the SMTP protocol.
note
This activity is called Send SMTP Mail Message in versions older than 1.24.
Project compatibility
Windows - Legacy | Windows | Cross-platform
Windows-Legacy configuration
Attachments
- Attachments - A list of string arguments that represent the attachments you want to send alongisde the email.
- AttachmentsCollection - An
IEnumerable<String>object that specifies a list of files which you want to send as attachments.
Common
- DisplayName - The display name of the activity.
- TimeoutMS - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).
Email
- Subject - The subject of the email message.
- Body - The body of the email message.
Forward
- MailMessage - The message to be forwarded. This field only supports MailMessage objects.
Host
- Server - The email server host that is to be used.
- Port - The port that the email message is to be sent through.
Logon
- Email - The email account used to send the message.
- Password - The password of the email account used to get the message. If UseOAuth is selected, the value of this parameter must be an OAuth2 access token.
- SecurePassword - The password of the email account used, as a secure string. If UseOAuth is selected, the value of this parameter must be an OAuth2 access token.
- UseOAuth - Indicates whether to use an OAuth2 access token instead of a password. By default, this option is not selected.
note
If you are connecting to a server that doesn't use authentication, all the Logon properties must be left blank.
Misc
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Options
- ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (
True,False). The default value isFalse. As a result, if the field is not configured and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error. - Ignore CRL - Specifies whether to ignore the Certificate Revocation List validation when connecting. This field only accepts
Booleanvalues and variables. If left empty, the defaultFalsevalue is used. - IsBodyHtml - Specifies whether the body of the message is written in HTML format.
- ReplyTo - The email address to be used when replying.
- SecureConnection - Specifies the SSL and/or TLS encryption to be used for the connection.
Output
- StatusCode - The status code returned by the server, as a String variable. The activity runs successfully only if the status code is
250. To continue execution for other response codes like251or252, you can set the ContinueOnError property toTrue.
Receiver
- To - The main recipients of the email message.
- Cc - The secondary recipients of the email message.
- Bcc - The hidden recipients of the email message.
Sender
- Name - The display name of the sender.
- From - The email address of the sender.
Windows, Cross-platform configuration
- Connection - The connection established in Integration Service for the Mail connector.
- To - The main recipients of the email message.
- Subject - The subject of the email.
- Body - The body of the email.
- Attachments - The list of files to attach to the email. This field supports
IResourcetype input, for file variables, orStringtype input, for file paths.
note
For more details on the plus menu options, check Designing automations.
Properties
Common
- TimeoutMS - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).
Connection details
- Use Integration Service - Specify whether to use an Integration Service connection or not. By default, the value is set to True. When the value is False, the following server connection fields are displayed:
- Server - The email server host to be used. This field supports
Stringtype input. - Port - The port used to get the email message. This field supports
Int32type input. - Use OAuth - Indicates whether to use an OAuth2 access token instead of a password. By default, this option is not selected.
- Email - The email account used to get the message. This field supports
Stringtype input. - Password - The password of the email account used to get the message. If Use OAuth is enabled, the value of this parameter must be an OAuth2 access token. This field supports
Stringtype input. - Secure password - The password of the email account used, as a secure string. If Use OAuth is selected, the value of this parameter must be an OAuth2 access token.
- Ignore CRL - Indicates whether to ignore the Certificate Revocation List validation when connecting. Boolean value. Default is False.
- Secure connection - Specifies the SSL and/or TSL encryption to be used for the connection.
- Server - The email server host to be used. This field supports
Forward or Reply
- Source email - The message to be forwarded or replied to. This field only supports MailMessage objects.
- Source email action - What to do with the source email. Select one of the following options: Forward, Reply, or Reply All.
Options
- Continue on error - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is not configured and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
- Reply to - The email address to be used when replying.
Output
- Status code - The status code returned by the server, as a String variable. The activity runs successfully only if the status code is
250. To continue execution for other response codes like251or252, you can set the ContinueOnError property toTrue.
Receiver
- BCC - The hidden recipients of the email message.
- CC - The secondary recipients of the email message.
Sender
- Name - The display name of the sender.
- From - The email address of the sender.