# 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="/files/7ODUoIDRnu4SnBdWOI3u" 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: 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://docs.uibakery.io/reference/working-with-actions/smtp-request.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.
