# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgps.gitbook.io/data-flo/reference-guide/send-email-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
