> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hooksnode.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IMAP mailbox

> Read any hosted mailbox, such as cPanel, Zoho or Yahoo, and send email.received events.

An IMAP source reads new mail in one folder of any mailbox that supports IMAP. Use it for hosted email that has no API. Each message becomes an [`email.received`](/events/email-received) event with `"provider": "imap"`.

<Info>IMAP sources need a Pro project.</Info>

## Set up

Open **Sources → Add source → IMAP mailbox** and fill in the form. hooksnode runs a test poll before it saves. If the test fails, nothing is saved and you see the error.

| Field                        | Default                           | Notes                                                             |
| ---------------------------- | --------------------------------- | ----------------------------------------------------------------- |
| Host                         |                                   | A host name such as `mail.example.com`. Not an IP address.        |
| Security                     | `tls`                             | `tls` or `starttls`. Plain text is not allowed.                   |
| Port                         | `993` for TLS, `143` for STARTTLS |                                                                   |
| Username                     |                                   | Up to 320 characters.                                             |
| Password                     |                                   | Stored encrypted. Use an app password when your provider has one. |
| Folder                       | `INBOX`                           | Pick from the list after the first connect.                       |
| Interval                     | 5 minutes                         | 1 minute to 1 day.                                                |
| From / To / Subject contains |                                   | Optional. They ignore case.                                       |
| Bank alerts                  | `off`                             | See [Bank alerts](/sources/bank-alerts).                          |

## How it works

* **Read only.** hooksnode opens the folder in read-only mode. Mail stays unread.
* **No old mail.** The first poll records where the folder ends. It sends nothing.
* **Batches.** Each poll reads up to 50 messages. A longer backlog continues on the next poll.
* **Large mail.** A message over 10 MiB is sent with its headers only, and `truncated: true`.
* **Folder reset.** If the server resets the folder (`UIDVALIDITY` changes), hooksnode starts again at the end of the folder and shows **The mail server reset this folder.**
* **No duplicates.** The idempotency key includes the message position, so a retried poll never sends a message twice.

## Problems

| What you see                      | What to do                                                                            |
| --------------------------------- | ------------------------------------------------------------------------------------- |
| **Last poll failed**              | The page shows the error and the try count. Fix the cause, then press **Check now**.  |
| **Error** after a sign-in failure | Update the password and save. The save runs a test poll and turns the source back on. |

A failed poll backs off: the interval doubles each time, up to 1 hour.
