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

# Configure SMTP for self-hosted email delivery

> Set up notification and automation email in System Admin or environment variables. Configure SMTP, test delivery and check configuration priority.

## Configuration Methods

Teable supports two ways to configure email service:

> [card] System Admin (Recommended)
>
> Visual configuration with live testing. No restart required.

[Open](#option-1-admin-panel-recommended)

> [card] Environment Variables
>
> Traditional configuration via `.env` file. Requires container restart.

[Open](#option-2-environment-variables)

***

## Option 1: System Admin (Recommended)

The easiest way to configure email is through System Admin:

1. Log in as an administrator (the first registered user)
2. Go to **System Admin** → **Instance settings**
3. Find the **Email config** section
4. Configure **Notify email** and **Automation email** as needed: click the button on the right of the row, enter the SMTP details in the dialog, and save

![Email config in Instance settings, with Notify email and Automation email](https://mintcdn.com/teablecn/YeoIhr1-KtgWHlAL/images/selfhosted/email/2026-10-21-admin-settings-email-config.png?fit=max\&auto=format\&n=YeoIhr1-KtgWHlAL\&q=85\&s=656bc9d9392f30f8668e8687d0c59cf1)

> [!TIP]
>
> The configuration dialog supports live testing: before saving, enter a test email address and click **Send** to check that your SMTP settings work.

* **Notify email**: Used for user verification, password reset, invitations, system notifications, and similar emails. It is also what makes **Sign in with email code** available on the sign-in page.
* **Automation email**: Used as the default mail service for automation Send Email actions. A single Send Email action can also configure its own [custom SMTP server](https://help.teable.ai/en/basic/automation/actions/communication/smtp-sender.md).

After you change the **Server address**, **Port**, **SSL/TLS**, or **Username** of a saved configuration, enter the **Password** again before you can save or test.

### Configuration sources and priority

We recommend configuring mail service in **System Admin → Instance settings → Email config** first. The effective priority is:

1. **Custom mail server inside the Send Email action**: Applies only to that specific Send Email action in the current automation.
2. **System Admin → Instance settings → Email config → Automation email**: Used by automation emails when the Send Email action does not configure its own mail server.
3. **System Admin → Instance settings → Email config → Notify email**: Used for user verification, password reset, invitations, system notifications, and similar emails. It is also used as the fallback for automation emails if Automation email is not configured.
4. **`BACKEND_MAIL_*` environment variables**: Deployment-level default mail configuration. Used only as a fallback when the corresponding mailbox is not configured in System Admin.

### Configuration Fields

| Field | Description | Example |
| - | - | - |
| Server address | SMTP server address | `smtp.gmail.com` |
| Port | SMTP port | `465` (SSL) or `587` (TLS) |
| SSL/TLS | Whether to use SSL/TLS | `true` |
| Username | SMTP authentication user | `noreply@company.com` |
| Password | SMTP password or app password | `xxxxxxxxxxxxxx` |
| Sender | From address | `noreply@company.com` |
| Sender name | Display name | `Teable Notification` |

***

## Option 2: Environment Variables

For deployments where you prefer file-based configuration, use environment variables:

> [!NOTE]
>
> We recommend configuring Notify email and Automation email in **System Admin → Instance settings → Email config** first. Environment variables are mainly used as deployment-level defaults and fallback configuration.

```sh theme={null}
BACKEND_MAIL_HOST=smtp.example.com
BACKEND_MAIL_PORT=465
BACKEND_MAIL_SECURE=true
BACKEND_MAIL_SENDER=noreply@company.com
BACKEND_MAIL_SENDER_NAME=Teable
BACKEND_MAIL_AUTH_USER=username
BACKEND_MAIL_AUTH_PASS=your_password
```

> [!NOTE]
>
> After changing environment variables, you must **restart** the Teable container for changes to take effect.

***

## SMTP Provider Examples

> [accordion] AWS SES
>
> ```sh theme={null}
> # How to obtain: AWS Console → Simple Email Service → SMTP Settings → Create SMTP Credentials
> BACKEND_MAIL_HOST=email-smtp.us-east-1.amazonaws.com  # Replace with your region
> BACKEND_MAIL_PORT=465
> BACKEND_MAIL_SECURE=true
> BACKEND_MAIL_SENDER=noreply@yourdomain.com  # Must be a verified sender address
> BACKEND_MAIL_SENDER_NAME=Teable Notification
> BACKEND_MAIL_AUTH_USER=your_smtp_username   # AWS SMTP username
> BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx       # AWS SMTP password
> ```

> [accordion] Gmail
>
> ```sh theme={null}
> # How to obtain: Google Account → Security → 2-Step Verification → App Passwords
> BACKEND_MAIL_HOST=smtp.gmail.com
> BACKEND_MAIL_PORT=465
> BACKEND_MAIL_SECURE=true
> BACKEND_MAIL_SENDER=you@gmail.com
> BACKEND_MAIL_SENDER_NAME=Teable Notification
> BACKEND_MAIL_AUTH_USER=you@gmail.com
> BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx  # 16-digit app password
> ```

> [accordion] Microsoft 365 / Outlook
>
> ```sh theme={null}
> # How to obtain: Microsoft 365 admin center → Security → Policies & rules → Email authentication
> BACKEND_MAIL_HOST=smtp.office365.com
> BACKEND_MAIL_PORT=587
> BACKEND_MAIL_SECURE=true
> BACKEND_MAIL_SENDER=your.name@yourdomain.com
> BACKEND_MAIL_SENDER_NAME=Teable Notification
> BACKEND_MAIL_AUTH_USER=your.name@yourdomain.com
> BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx  # Your Microsoft 365 password or app password
> ```

> [accordion] SendGrid
>
> ```sh theme={null}
> # How to obtain: SendGrid Dashboard → Settings → API Keys → Create API Key
> BACKEND_MAIL_HOST=smtp.sendgrid.net
> BACKEND_MAIL_PORT=465
> BACKEND_MAIL_SECURE=true
> BACKEND_MAIL_SENDER=noreply@yourdomain.com
> BACKEND_MAIL_SENDER_NAME=Teable Notification
> BACKEND_MAIL_AUTH_USER=apikey
> BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx  # Your SendGrid API Key
> ```

***

## Related Documentation

* [Environment Variables Reference](https://help.teable.ai/en/deploy/env.md)
* [System Admin Overview](https://help.teable.ai/en/basic/admin-panel/overview.md)


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