> For the complete documentation index, see [llms.txt](https://dexcore.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dexcore.gitbook.io/guide/dexcore-guide-es/setup/installation/config-file/gmail-setup.md).

# Gmail Setup

Gmail is the most popular choice for connecting your domains to DexCore via IMAP. Follow these steps to set it up.

***

## Step 1: Enable IMAP in Gmail

1. Open [Gmail](https://mail.google.com) and sign in
2. Click the **⚙️ gear icon** → **See all settings**
3. Go to the **Forwarding and POP/IMAP** tab
4. Under **IMAP access**, select **Enable IMAP**
5. Click **Save Changes**

{% hint style="warning" %}
If IMAP is not enabled, DexCore will not be able to read incoming emails from your domains.
{% endhint %}

***

## Step 2: Create an App Password

Since Gmail requires 2-Step Verification for third-party apps, you need to generate an App Password:

1. Go to [Google Account Security](https://myaccount.google.com/security)
2. Make sure **2-Step Verification** is turned **ON**
3. Go to [App Passwords](https://myaccount.google.com/apppasswords)
4. Select **Mail** as the app and **Windows Computer** as the device
5. Click **Generate**
6. Copy the **16-character password** (e.g., `czbv ghdg myvc ydmu`)

{% hint style="danger" %}
Use this App Password in your Config file — **not** your regular Gmail password. Regular passwords will not work with IMAP.
{% endhint %}

***

## Step 3: Add to Config File

Use the following format in your [Config File](/guide/dexcore-guide-es/setup/installation/config-file.md):

```json
{
  "email": "yourgmail@gmail.com",
  "password": "czbv ghdg myvc ydmu",
  "domain": "@yourdomain.org",
  "imapHost": "imap.gmail.com",
  "imapPort": 993
}
```

| Field        | Value                                                    |
| ------------ | -------------------------------------------------------- |
| **email**    | Your Gmail address                                       |
| **password** | The 16-character App Password (not your Gmail password!) |
| **domain**   | Your purchased domain with `@` prefix                    |
| **imapHost** | `imap.gmail.com`                                         |
| **imapPort** | `993`                                                    |

***

## How It Works

```
Your Domain → Catch-all → Gmail Inbox → IMAP → DexCore Bot
```

1. You buy a domain and set up **catch-all** forwarding to your Gmail
2. All emails sent to `anything@yourdomain.com` arrive in Gmail
3. DexCore connects to Gmail via **IMAP** and reads those emails
4. The bot uses these emails as recovery addresses for Outlook accounts

{% hint style="success" %}
One Gmail account handles one domain. If you have multiple domains, set up multiple Gmail accounts.
{% endhint %}
