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

# Custom SMTP / IMAP

> Connect your own email server to sync sent and received emails as activity signals.

## Overview

Nous connects to your SMTP/IMAP server and syncs your inbox and sent folder every 15 minutes — the same way Gmail works, but for any email provider (Hostinger, Outlook 365, Zoho, custom self-hosted mail, etc.).

* **Inbound emails** from contacts are logged as `email_received`
* **Outbound emails** to contacts are logged as `email_sent`
* Activities appear on the contact's timeline just like Gmail events

## Setup

### 1. Connect in Nous

Go to **Integrations → SMTP / IMAP** and enter your credentials:

| Field                       | Description                                                                                                    |
| --------------------------- | -------------------------------------------------------------------------------------------------------------- |
| **Host**                    | Your SMTP server hostname (e.g. `smtp.hostinger.com`)                                                          |
| **Port**                    | Usually `587` (STARTTLS) or `465` (SSL)                                                                        |
| **Username**                | Your email address or SMTP username                                                                            |
| **Password**                | Your email password or app password                                                                            |
| **IMAP host**\*(optional)\* | Override IMAP hostname if different from SMTP. Nous auto-derives it by replacing `smtp.` → `imap.` if not set. |
| **IMAP port**\*(optional)\* | Defaults to `993`                                                                                              |

### 2. Test the connection

Click **Test connection** — Nous will verify your SMTP credentials using a live connection check.

<Note>
  For Gmail accounts, use [Google OAuth](/providers/google-calendar) instead of SMTP. Google blocks basic auth for Gmail.
</Note>

### 3. Done

Nous starts syncing on the next 15-minute cycle. The first sync pulls the last 30 days of email.

## How IMAP sync works

Every 15 minutes, Nous:

1. Connects to your IMAP server and opens `INBOX` and `Sent` (auto-detected via IMAP folder flags — works across all providers)
2. Fetches messages newer than the last sync timestamp
3. Matches `From` / `To` / `Cc` addresses against your existing contacts
4. Logs `email_sent` (you → contact) or `email_received` (contact → you) on the matching contact's timeline
5. Deduplicates by message ID — replaying the same email is safe
6. Saves the sync timestamp so the next run only fetches new messages

Nous **never creates new contacts** from SMTP/IMAP — it only logs activity on contacts that already exist in your workspace.

## Provider-specific notes

| Provider             | SMTP host            | IMAP host            | Notes                                 |
| -------------------- | -------------------- | -------------------- | ------------------------------------- |
| Hostinger            | `smtp.hostinger.com` | `imap.hostinger.com` | Auto-derived correctly                |
| Zoho                 | `smtp.zoho.com`      | `imap.zoho.com`      | Auto-derived correctly                |
| Custom / self-hosted | Your host            | Your IMAP host       | Set IMAP host explicitly if different |

## Environment variables

No server-level env vars required for SMTP — credentials are stored per workspace, encrypted at rest.
