---
title: SMTP
description: Configure any email provider via SMTP in Notiflows
---

SMTP is a universal adapter that lets you connect any email provider that supports standard SMTP credentials. Use this when your provider isn't natively supported, or when you want to use your own mail server.

## Prerequisites

Before configuring SMTP in Notiflows, you need:

1. SMTP server credentials from your email provider
2. A verified sender address (if required by your provider)

## Configuration

| Field | Required | Description |
|-------|----------|-------------|
| Host | Yes | SMTP server hostname (e.g., `smtp.example.com`) |
| Port | Yes | SMTP port (typically 587 for TLS, 465 for SSL, 25 for unencrypted) |
| Username | No | SMTP authentication username |
| Password | No | SMTP authentication password |
| SSL | No | Enable SSL connection (default: off) |
| TLS | No | TLS mode: `always`, `never`, or `if_available` (default) |
| From Email | Yes | Sender email address |
| From Name | No | Display name shown to recipients |

## Common SMTP Settings

| Provider | Host | Port | TLS |
|----------|------|------|-----|
| Gmail | `smtp.gmail.com` | 587 | Always |
| Outlook/Office 365 | `smtp.office365.com` | 587 | Always |
| Postmark | `smtp.postmarkapp.com` | 587 | Always |
| Mailgun | `smtp.mailgun.org` | 587 | Always |
| SendGrid | `smtp.sendgrid.net` | 587 | Always |
| Amazon SES | `email-smtp.{region}.amazonaws.com` | 587 | Always |

## Set up in Notiflows

1. Navigate to **Channels** in your project
2. Click **Create Channel**
3. Select **Email** as the channel type
4. Select **SMTP** as the provider
5. Enter your **Host**, **Port**, and authentication credentials
6. Configure **SSL/TLS** based on your provider's requirements
7. Enter your **From Email** and optionally a **From Name**
8. Save the channel

## Templates

Email templates support three content types:
- **Visual** - Drag-and-drop editor for rich HTML emails
- **HTML** - Raw HTML with full control
- **Plaintext** - Simple text emails

Use Liquid templating for dynamic content:

```liquid
Hi {{ recipient.first_name }},

{{ data.message }}
```

Available variable contexts:
- `recipient.*` - Recipient user data (first_name, last_name, email, etc.)
- `actor.*` - User who triggered the notification
- `data.*` - Custom payload passed when triggering the notiflow
