---
title: "Set up PocketBase mail settings over SMTP"
description: "Dashboard → Settings → Mail settings with TLS encryption Auto (StartTLS) for 587, then Send test email."
url: https://www.unitpost.com/docs/smtp/pocketbase
section: SMTP
updated: 2026-11-02
---
# Set up PocketBase mail settings over SMTP

## 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

## Set up PocketBase mail settings over SMTP

> Dashboard → Settings → Mail settings with TLS encryption Auto (StartTLS) for 587, then Send test email.

PocketBase sends verification, password reset, email change and OTP emails, and by default hands them to the server's `sendmail` command. Switch it to SMTP under Settings → Mail settings in the dashboard; the values are stored with your app's settings, so there's no file to edit. The TLS choice sits under Show more options: Auto (StartTLS) is for 587 and Always is for 465.

### 1. Create a send-only key

In Unitpost, open Settings → SMTP and create a send-only key. PocketBase's Sender address must be on a verified domain (/docs/domains).

### 2. Fill in Mail settings

Turn on Use SMTP mail server, then click Show more options to reach the TLS setting.

- Sender name: Your app
- Sender address: no-reply@yourdomain.com
- SMTP server host: smtp.unitpost.com
- Port: 587
- Username: unitpost
- Password: Your Unitpost API key
- TLS encryption: Auto (StartTLS)
- AUTH method: PLAIN (default)

> For port 465, set TLS encryption to Always.

### 3. Save and send a test

Click Save changes, then Send test email. Pick a template such as Password reset and an auth collection, enter a To email address and click Send. The message shows up in Unitpost Emails.

### 4. If the test fails

`535 5.7.8` means Username isn't `unitpost`. `550 5.7.1` means Sender address isn't on a verified domain. A timeout on 465 means TLS encryption is still Auto (StartTLS).

## Related

- [Configure authentik email over SMTP](https://www.unitpost.com/docs/smtp/authentik): AUTHENTIK_EMAIL__* in .env, USE_TLS for 587 or USE_SSL for 465, then ak test_email in the worker.
- [Metabase SMTP settings for subscriptions and alerts](https://www.unitpost.com/docs/smtp/metabase): Admin → Settings → Email or MB_EMAIL_SMTP_* variables: STARTTLS on 587, SSL on 465.
- [Configure the Gitea mailer over SMTP](https://www.unitpost.com/docs/smtp/gitea): Mailer settings in app.ini with an explicit PROTOCOL and FROM, then Send Testing Email in Site Administration.
