# IMAP Setup

We support <mark style="color:yellow;">GMAIL</mark> and <mark style="color:yellow;">Outlook</mark> support out of the box and support <mark style="color:yellow;">custom IMAP hosts</mark>!&#x20;

### Setting up Outlook/Custom

* For Outlook, all you have to do is entering your email and password into their respective fields.&#x20;
* For custom domains, we need the IMAP host and port besides the email and password.&#x20;

### Setting up Gmail

Follow these steps to allow the bot to be able to grab OTP codes from your email, make sure when enabling these settings it is the right Gmail account.

1. Go to [Gmail Settings](https://mail.google.com/mail/u/6/#settings/fwdandpop) and enable IMAP.&#x20;
2. Enable [2-Step Verification](https://myaccount.google.com/u/1/security) if this isn't enabled yet.&#x20;
3. Go to "[Create App password](https://myaccount.google.com/apppasswords)".
4. Enter a name and click "Generate".
5. <mark style="color:yellow;">Copy</mark> the generated password into the <mark style="color:yellow;">password input</mark> on the <mark style="color:yellow;">IMAP form</mark>.
6. <mark style="color:yellow;">Enter</mark> your Gmail email into the <mark style="color:yellow;">email input</mark> on the <mark style="color:yellow;">IMAP form</mark>.&#x20;
7. <mark style="color:yellow;">Press</mark> save and <mark style="color:yellow;">click</mark> on the start button and check if it successfully connects!&#x20;

<figure><img src="/files/gTXWRM7fq7FtENjaXk4s" alt=""><figcaption></figcaption></figure>


---

# 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.caspianaio.com/getting-started/imap-setup.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.
