> For the complete documentation index, see [llms.txt](https://cgps.gitbook.io/data-flo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cgps.gitbook.io/data-flo/reference-guide/send-email-message.md).

# send-email-message

## Description

<mark style="color:purple;">`send-email-message`</mark> *adaptor sends an email message via a SMTP server.*

## Inputs

**`smtp host`**\
Type: `text`\
Required: Yes\
The hostname or IP address of the SMTP server.

**`smtp port`**\
Type: `number`\
Required: Yes\
The port of the SMTP server.

**`smtp username`**\
Type: `text`\
Required: No\
The username of the SMTP account.

**`smtp password`**\
Type: `text`\
Required: No\
The password of the SMTP account.

**`smtp secure`**\
Type: `boolean`\
Required: Yes\
When set to `True`, the connection to the server will use TLS protocol.

**`from address`**\
Type: `text`\
Required: Yes\
The email address of the sender. Can be plain `sender@example.com` or formatted `"Sender Name" sender@example.com`.

**`to address`**\
Type: `text`\
Required: Yes\
Comma separated list or an array of recipients email addresses. Can be plain `recipient@example.com` or formatted `"Recipient Name" recipient@example.com`.

**`subject`**\
Type: `text`\
Required: Yes\
The subject of the email.

**`text`**\
Type: `text`\
Required: Yes\
The plaintext version of the message.

## Outputs

**`message id`**\
Type: `text`\
The final Message-Id value returned by the SMTP server.

**`status code`**\
Type: `text`\
Includes the last SMTP response from the server.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`smtp host:` smtp.example.com&#x20;

`smtp port`: 1025

&#x20;`smtp username:` example\_username

&#x20;`smtp password:` example\_password

&#x20;`smtp secure:` True

&#x20;`from address:` <sender@example.com>

&#x20;`to address:` <recipient@example.com>

&#x20;`subject:` Example Subject

&#x20;`text:` This is a sample email message.

#### Outputs:

`message id`: ABC123DEF456

`status code`: 250

-> Sent an email message and received a status code 250 which means the message was delivered.

## Use case

* Combine with the output of the [`export-to-microreact-project`](/data-flo/reference-guide/export-to-microreact-project.md) adaptor to email a link to a Microreact project containing data newly updated via Data-flo.
