# Send Mail Task

The *Send Mail* object can be used to send email notifications to a user or administrator at appropriate junctions in a workflow.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F7amH9jP7sDHgwWZXTUzC%2Fimage.png?alt=media&#x26;token=1a919db6-ff29-456d-811e-108786367917" alt=""><figcaption></figcaption></figure>

1. First, we will drag and drop the *Send Mail* object onto the workflow from the Toolbox. Right-click on the object’s header and select *Properties* from the context menu.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FlEWe5lMnVb8yGJ1fe6ef%2Fimage.png?alt=media&#x26;token=6dee9edb-8102-46e4-8f0f-267a60f7d199" alt=""><figcaption></figcaption></figure>

This will open the *Properties* screen.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FyQ9ePbJcHT0sx93HvTPK%2Fimage.png?alt=media&#x26;token=f568778d-7820-43b1-9f0a-93c5424e1fb3" alt=""><figcaption></figcaption></figure>

*Server:* Configure a connection for the email server provider.

2. Click on the ellipses button next to the *Server* textbox. This will open a new window where the properties of the server connection can be configured.
   * *Url:* The address of the mail server on which the connection will be configured.
   * *Login Name:* The Hostname
   * *Password:* Password of the user.
   * *Port:* The port of the mail server on which to configure. Some examples of SMTP provider ports are; 567 for Outlook, 25 for Google, etc.
   * *Require SSL:* Check this box for secure communication with the server.
   * *Connection Logging:* Connection logging is used to log different types of messages or events between the client and the server. In case of error or debugging purposes, the user can see them.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FzKtJbRYImxTSssQNg9o0%2Fimage.png?alt=media&#x26;token=b0772cec-b6a0-49e3-9a12-55aab1bb826e" alt=""><figcaption></figcaption></figure>

Astera supports 4 types of *Connection Logging* methods in Astera:

* *Verbose:* Captures everything.
* *Debug:* Captures only the content that can be used in debugging.
* *Info:* Captures information and general messages.
* *Error:* Captures only the errors.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2Fj6EZz6RTK4ZYopRLN70s%2Fimage.png?alt=media&#x26;token=76866a35-c9d7-4eb1-a626-88f6e32ca7f0" alt=""><figcaption></figcaption></figure>

3. Once done, click *OK* and the server properties will be configured.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FFKkvR6Ll7h8MbemItXRg%2Fimage.png?alt=media&#x26;token=3d4679e3-0301-4ebc-956e-239f0870981c" alt=""><figcaption></figcaption></figure>

The following properties can be configured from the *Send Mail Properties* window:

* *From:* The sender’s email address. It should be the same as the email specified in the connection.

{% hint style="info" %}
**Note:** The object has the capability to send a test mail to verify the connection details specified.
{% endhint %}

* *To:* The recipient’s email address.
* *Subject:* Subject of the email.
* *CC:* This allows you to send a copy of the email to any recipient of your choice
* *BCC:* This allows you to add additional recipients to the mail to be sent.
* *Attachment:* Browse a file attachment to be sent in the mail.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FbNqTV6WT4NqlxjmmNjFp%2Fimage.png?alt=media&#x26;token=7d4c12c5-75ac-46f0-b32f-9c93a1a3a914" alt=""><figcaption></figcaption></figure>

* *Html Content:* Check this box if the email message body is to be defined in an HTML format.
* *Message:* This is where the body of the email is going to be present.

{% hint style="info" %}
**Note:** The angular brackets to the right side of the message body tell you that the use of parameters is supported to parameterize the mail body using flow variables.
{% endhint %}

4. Once done, click *Next* and you will be led to the *Config Parameters* screen.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F7JYMs5P5JYQc5So9pbjo%2Fimage.png?alt=media&#x26;token=b57adaba-01b0-4f7b-9389-ba7c30c76664" alt=""><figcaption></figcaption></figure>

Parameters can provide deployment of flows by eliminating hardcoded values and provide a dynamic way of changing multiple configurations with a simple value change.

{% hint style="info" %}
**Note**: Parameters left blank will use their default values assigned on the properties page.
{% endhint %}

5. Click *Next* and you will be led to the *General Options* screen.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FJs51K4GEBgjgA5DYA7CA%2Fimage.png?alt=media&#x26;token=1a1511ac-57b4-4998-b84e-143dd1ef5fd0" alt=""><figcaption></figcaption></figure>

Here, you can add any *Comments*.

6. Click *OK* and the *Send Mail* object will be configured.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FKCRvCrEoBcQZK1qpr6e2%2Fimage.png?alt=media&#x26;token=6730aadb-436c-4268-99e7-adb774a68ec0" alt=""><figcaption></figcaption></figure>
