---
title: "Configure n8n SMTP for invites and password resets"
description: "N8N_SMTP_* environment variables with N8N_SMTP_SSL=false for port 587, then invite a user to test."
url: https://www.unitpost.com/docs/smtp/n8n
section: SMTP
updated: 2026-11-02
---
# Configure n8n SMTP for invites and password resets

## Connection settings

- **Host**: smtp.unitpost.com
- **Username**: unitpost (always this literal value)
- **Password**: Your Unitpost API key (must carry emails:send)
- **Port (STARTTLS)**: 587 (or 2587 if blocked, or 25)
- **Port (implicit TLS)**: 465 (or 2465 if blocked)
- **Security**: TLS 1.2 or 1.3 (required before AUTH)
- **From address**: Any address on a verified domain

## Configure n8n SMTP for invites and password resets

> N8N_SMTP_* environment variables with N8N_SMTP_SSL=false for port 587, then invite a user to test.

Self-hosted n8n emails user invites, password resets and sharing notifications using the `N8N_SMTP_*` environment variables. Two defaults trip people up: `N8N_SMTP_PORT` is 465 and `N8N_SMTP_SSL` is `true`, so a 587 setup needs `N8N_SMTP_SSL=false`. These variables don't touch the Send Email node, which has its own SMTP credential.

### 1. Create a send-only key

In Unitpost, open Settings → SMTP and create a send-only key. Set `N8N_SMTP_SENDER` to an address on a verified domain (/docs/domains): n8n only falls back to `N8N_SMTP_USER` as the sender when it contains an @, and `unitpost` doesn't.

### 2. Set the environment variables

```env
N8N_EMAIL_MODE=smtp
N8N_SMTP_HOST=smtp.unitpost.com
N8N_SMTP_PORT=587
N8N_SMTP_USER=unitpost
N8N_SMTP_PASS=pk_live_...
N8N_SMTP_SENDER=n8n@yourdomain.com
N8N_SMTP_SSL=false
N8N_SMTP_STARTTLS=true
```

> For port 465, set `N8N_SMTP_PORT=465` and `N8N_SMTP_SSL=true`. `N8N_SMTP_STARTTLS` only applies while SSL is off.

### 3. Restart n8n

A running n8n instance doesn't pick up new SMTP variables. Restart the process or recreate the container.

### 4. Test with an invite

There's no test button for instance email. Open Settings → Users, click Invite, and invite an address you can read. The send also appears in Unitpost Emails.

### 5. Use the same values in the Send Email node

Workflows send through the Send Email node's SMTP credential, not the variables above.

- User: unitpost
- Password: Your Unitpost API key
- Host: smtp.unitpost.com
- Port: 587
- SSL/TLS: Off (on for port 465)

## Related

- [Grafana SMTP settings for alert email](https://www.unitpost.com/docs/smtp/grafana): The smtp section of grafana.ini: host and port in one value, MandatoryStartTLS, and a contact point test.
- [Set up Discourse email over SMTP](https://www.unitpost.com/docs/smtp/discourse): DISCOURSE_SMTP_* in containers/app.yml, a rebuild, then Send test email from the admin Emails page.
- [Configure Mastodon to send email over SMTP](https://www.unitpost.com/docs/smtp/mastodon): SMTP_* in .env.production with SMTP_ENABLE_STARTTLS=always on 587, then restart Sidekiq.
