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

# Mailbox

> Connect a mailbox through IMAP and SMTP so an agent answers your emails.

Any mailbox that offers IMAP (to read) and SMTP (to send) can be connected: your own mail server, a hosting provider, Google Workspace or Microsoft 365 with an app password. Shortext reads the new emails, the agent answers them by email, and the threads appear in the Inbox like any other conversation.

## Connect a mailbox

**1. Add the mailbox**

Open **Communication > Channels > Mail Inbox** and add a mailbox.

**2. Fill in the IMAP settings**

Host, port, encryption (SSL/TLS or STARTTLS), username, password and the folder to read (usually `INBOX`).

**3. Fill in the SMTP settings**

Host, port, encryption, username and password, and the sender: **from email** and **from name**.

**4. Save**

Shortext checks the IMAP and SMTP connections before saving. If a check fails, the error tells you which one and why (wrong password, port closed...).

**5. Choose the agent**

Choose the agent that answers the emails of this mailbox.

## Common settings

| Provider | IMAP | SMTP |
| - | - | - |
| Google Workspace / Gmail | `imap.gmail.com`, 993, SSL | `smtp.gmail.com`, 465 SSL or 587 STARTTLS |
| Microsoft 365 / Outlook | `outlook.office365.com`, 993, SSL | `smtp.office365.com`, 587, STARTTLS |

> [!NOTE]
>
> Gmail and Microsoft 365 usually require an **app password** (or IMAP to be enabled by your administrator) when you connect with IMAP / SMTP. One-click Gmail and Outlook connection is [coming soon](https://docs.shortext.ny-corp.io/channels/coming-soon.md).

## Let your clients connect their mailbox

If you build a product on Shortext, your clients can connect their own mailbox from your app through a [hosted session](https://docs.shortext.ny-corp.io/api-reference/hosted-sessions.md) with the `mail` purpose: they fill in the settings on a Shortext page, which checks them before saving.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.