Send SMTP Mail Message
Description
This activity sends email messages using the configured email server through the SMTP protocol.
Design Time Configuration
Like other email clients, this function enables you to compose and send new emails, forward messages, or respond to existing ones.
- New Mail - Check this option to compose and send a new mail to the designated recipients.
- Forward - Check this option to forward any existing mail to the designated recipients. To forward mail, you need to supply a mail message object in the Forward Mail property of this activity.
- Reply - Check this option to reply to any existing mail to the sender. Providing a mail message object in this activity's Reply To Mail property is necessary to respond to an email.
- Reply All - Check this option to reply to any existing mail to all the participants of that mail. Providing a mail message object in this activity's Reply To Mail property is necessary to respond to an email.
This activity allows you to compose your email through a dialog. You can bring up this dialog by clicking on the Configure button available as part of the body of this activity.
The dialog resembles the Send Email feature found in most email clients. It lets you indicate the email recipients by listing them in the To, CC, and Bcc fields. You can enter the subject of your email and write the body of the message. When composing an email, you can use rich text formatting within the body of the message.
The hyperlink feature in the Insert tab is only functional for public URLs.
If you need to reply to a specific email, you can indicate which one you are responding to. Similarly, if you need to forward an email, you can specify which email you want to forward.
When responding to an email, there's no need to include the recipient's address since the original message's sender will automatically receive the reply. Additionally, it generates the reply's subject line based on the initial email's subject. However, you do have the option to override the recipients and subject line as needed.
When forwarding an email, there is no need to provide a subject, as it will be generated automatically based on the original message's subject. However, you can override the subject if needed.
In the Process Data panel, you can view all the process variables. Double-click or drag the necessary variable into the body to use a dynamic value in your email content. This dialog box lets you construct your email template using process data placeholders.
When running the program, substitute the placeholders with the actual values of the process variables. The program can currently handle the following types of process data:
- System.Int16
- System.Int32
- System.Int64
- System.UInt16
- System.UInt32
- System.UInt64
- System.String
- System.Double
- System.Single
- System.Decimal
- System.Boolean
- System.Char
Properties
Attachments
- Attachments – Specify the attachments to the email message.
Common
- Timeout (in MS) – It Specifies the waiting time the activity takes to run before any error occurs. By default, it is only 30000 milliseconds (30 seconds).
Credential
- Email – Enter the email account to send the message. Password – Enter the email account's password to send the message.
Email
- Body – Specify the Body of the email message.
- Subject – Specify the Subject of the email message.
Host
- Port – Specify the SMTP port to send the email message.
- Server – Specify the SMTP email server host.
Forward
- Forward Mail - The mail message to be forwarded.
Reply
- Reply To Mail - The message you want to reply to.
Misc
- DisplayName – Add a display name to your activity.
- Private – By default, activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.
Optional
- Allow Untrusted Certificate - Specify the boolean value True to allow an untrusted certificate during the connection. By default, its value is False.
- Continue On Error – Specifies if the automation should continue even when this activity throws an error. This field only supports Boolean values (True, False). The default value is False.
If this activity is present inside the Try-Catch block, and the value of this property is True, it would catch no error.
Options
- Is Html – It depends on the Boolean function. If it's true, it takes the email body as Html.
- SSL – It depends on the Boolean function. If it's true, it enables SSL encryption for the connection.
Output
- Result – It displays the retrieved messages as a collection of Mail Message objects
Receiver
- Bcc – Specify the hidden recipients of the email message
- Cc – Specify the secondary recipients of the email message
- To – Specify the primary recipients of the email message
Sender
- From – Specify the email address of the sender.
- Name – Specify the display name of the sender.
Example
Download Example