> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/reference/working-with-actions/smtp-request.md).

# SMTP Request

UI Bakery allows sending emails using an external email server by connecting to it via the SMTP protocol. The SMTP Request action step configuration works just like in an ordinary email client. However, it has its own specific characteristics as well.

To start sending SMTP Requests, you need to select your SMTP data source and proceed to configuring the action's settings.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FC4tVCcgRj5BOX5MU0lU2%2FCleanShot%202025-05-21%20at%2016.38.19-min.png?alt=media&amp;token=9c7dbd2a-0e3a-47c5-b2c1-1b96ce835c52" alt=""><figcaption></figcaption></figure>

Below is a list of SMTP settings you can configure:

* **From**
* **Reply-To**\
  You can use this field if you want your recipients to reply to a different email address than the one you send your emails from. In other cases, you should leave this field blank.
* **To/CC/BCC**\
  These fields accept a single email or a comma-separated list of emails. For example, both of the options below are valid to define the recipients:

```javascript
{{ui.input.value}}
```

```js
email1@email.com,{{ui.input.value}}
```

* **Subject**
* **Text part & HTML part**\
  You can define one of them or both to support plain text clients and HTML ones at the same time.
* **Attachments**\
  This field accepts a File object/a list of File objects that are retrieved from the File picker component, for example:

```js
{{ui.filepicker.value}}
```

The *Attachments* field can also accept a JavaScript object (or a list of such objects) that contains information about the file, for example:

```js
{   // define custom content type for the attachment
   filename: 'text.bin',
   content: 'hello world!',
   contentType: 'text/plain'
}
```

or

```js
{   // encoded string as an attachment
   filename: 'text1.txt',
   content: 'aGVsbG8gd29ybGQh',
   encoding: 'base64'
}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uibakery.io/reference/working-with-actions/smtp-request.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
