# SMTP

## Configuration

To connect to an SMTP data source, follow the instruction below:

1. On the **Data sources** page, click **Connect**, and select *SMTP* in the Data sources list.
2. Give your data source a name and specify the required credentials:
   1. In the **Host** field, provide your server address.\
      \
      The SMTP server address typically looks like *smtp.example.com* or *mail.example.com*. For example, for Gmail the SMTP server address is usually `smtp.gmail.com`.<br>
   2. Next, determine the *port number*.\
      \
      SMTP servers usually listen on **port 25**. However, some providers may use alternative ports like *587* (submission) or *465* (SMTPS). You need to know the correct port number to establish the connection.
   3. Specify your *username* (for most SMTP providers, it should be your email address) and *password*.

{% hint style="warning" %}
Certain SMTP providers employ a multi-factor authentication process, so you might need a unique password exclusively for authenticating your UI Bakery application. Gmail SMTP requires [the creation of an app password](https://support.google.com/mail/answer/185833?hl=en) rather than your regular password.
{% endhint %}

3. Click **Test connection** to check whether the data source can be connected, and then click **Connect Datasource** to complete the setup.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2F1r6nfLVkFb8Zef9dd54u%2FCleanShot%202025-04-25%20at%2015.58.54%402x-min.png?alt=media&#x26;token=2837af74-7951-450f-b952-1e510bf429ed" alt=""><figcaption></figcaption></figure>

## Usage

Once the data source is connected, you can start sending [SMTP Requests](https://docs.uibakery.io/reference/working-with-actions/smtp-request).


---

# 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/data-sources/smtp.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.
