> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/react-native/mail/send.md).

# send

## Description

Sends an e-mail through SMTP server.

## Input / Parameter

| Name         | Description                                                                                                                                                                    | Input Type     | Default | Options | Required |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ------- | ------- | -------- |
| type         | Type or protocol to use.                                                                                                                                                       | Text           | -       | SMTP    | required |
| smtpHost     | SMTP server host URL to be used.                                                                                                                                               | Text           | -       | -       | required |
| smtpPort     | SMTP port number to be used.                                                                                                                                                   | Number         | -       | -       | required |
| smtpUsername | Username for the email account.                                                                                                                                                | Text           | -       | -       | required |
| smtpPassword | Password for the email account.                                                                                                                                                | Text           | -       | -       | required |
| smtpUseSSL   | Enable/disable secure SSL connection.                                                                                                                                          | Boolean        | True    | -       | -        |
| fromName     | Sender’s display name.                                                                                                                                                         | Text           | -       | -       | -        |
| to           | Contain a single object, or a list of one (1) or more objects which consist of: email (Text) Recipient’s email address & name (Text) – Recipient’s display name.               | Object / Array | -       | -       | required |
| bcc          | Contain a single object, or a list of one (1) or more objects which consist of: email (Text) BCC’ed email address & name (Text) – BCC’ed display name.                         | Object / Array | -       | -       | -        |
| subject      | The email’s title a.k.a. subject.                                                                                                                                              | Text           | -       | -       | required |
| body         | The email’s content a.k.a. body.                                                                                                                                               | Text           | -       | -       | required |
| attachment   | Contain a single object, or a list of one (1) or more objects which consist of: name (Text) File name that will be used. & value (Text) – direct file path of the attachments. | Object / Array | -       | -       | -        |
| extra        | Additional data to be used in the callbacks.                                                                                                                                   | Any            | -       | -       | No       |

## Output

| Description                        | Output Type |
| ---------------------------------- | ----------- |
| Returns the formatted information. | Object      |

### Object

| Key     | Description                                                             | Output Type |
| ------- | ----------------------------------------------------------------------- | ----------- |
| success | Boolean value to denote whether the function was executed successfully. | Text        |
| message | The message to print.                                                   | Text        |
| data    | Any additional message or data to print.                                | Text        |

## Callback

### callback

The function to be executed when the email is successfully sent.

### errorCallback

The function to be executed when the email is not successfully sent.

## Example

In this example, we will send an email to a recipient.

### Steps

1. Drag a button component to a page in the mobile designer and open up the `Action` tab.

![](/files/A5TTSKDCjgac3fkeDB6Y)

2. Select the event `press` and drag the `Mail.send` function to the event flow.

![](/files/J5kiQ2RvQ88EExbQKMTG)

3. Fill in the parameters of the function.

![](/files/TrZIO5rzYqcHDE6vkhns)

### Result

1. The email recipients should receive an email from the user.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/react-native/mail/send.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
