Configure Directus email over SMTP
Directus sends user invites, password resets and the emails your Flows send with the `EMAIL_*` environment variables. `EMAIL_TRANSPORT` defaults to `sendmail` and `EMAIL_FROM` to `no-reply@example.com`, so both need changing. `EMAIL_SMTP_SECURE` goes to Nodemailer as `secure`, which means TLS from the first byte on port 465; on 587 leave it `false`.
Create a send-only key
In Unitpost, open Settings → SMTP and create a send-only key. Set
EMAIL_FROMto an address on a verified domain.Set the environment variables
EnvEMAIL_TRANSPORT=smtp EMAIL_FROM=no-reply@yourdomain.com EMAIL_SMTP_HOST=smtp.unitpost.com EMAIL_SMTP_PORT=587 EMAIL_SMTP_USER=unitpost EMAIL_SMTP_PASSWORD=pk_live_... EMAIL_SMTP_SECURE=falseFor port 465, set
EMAIL_SMTP_PORT=465andEMAIL_SMTP_SECURE=true. Don't setEMAIL_SMTP_IGNORE_TLS=true: it skips STARTTLS, and Unitpost refuses to log in without TLS (538).Restart Directus
Directus reads these variables when it starts, so restart the process or container. With
EMAIL_VERIFY_SETUPat its defaulttrue, a failed SMTP connection is logged asEmail connection failed.Check the connection
Call
/server/healthwith an admin token. For admins, the response includes anemail:connectioncheck that runs a live SMTP verify.Shellcurl -H "Authorization: Bearer $DIRECTUS_ADMIN_TOKEN" https://directus.yourdomain.com/server/healthSend a real one
Use Forgot Password on the sign-in page, or invite a user from the User Directory. The email shows up in Unitpost Emails.