SMTP Relay
Already have a mail library? Point it at our SMTP relay and your transactional email starts flowing — no API client to install.
When to use SMTP
Reach for SMTP if you:
- Already use a mail library (Nodemailer, SwiftMailer, ActionMailer, JavaMail, MailKit, etc.) and don’t want to swap it out
- Want to migrate from Postfix, SendGrid, Mailgun, or another SMTP provider with zero code changes — just update credentials
- Need to integrate with a third-party tool that only speaks SMTP
Reach for the HTTP API instead if you:
- Want delivery webhooks, idempotency keys, or per-message lookup
- Need to send via starter templates with structured variables
- Care about response payloads (the SMTP relay returns a 250 OK and that’s it)
SMTP requires a bx_live_… key with the emails:send permission. Preview keys (bx_preview_…) can connect and authenticate via SMTP, but every send is rejected. Sign up free at app.brixus365.com/signup for a live key.
Server config
| Setting | Value |
|---|---|
| Host | smtp.brixus365.com |
| Port | 587 (STARTTLS) |
| Encryption | STARTTLS — TLS upgraded after initial connection |
| Authentication | AUTH LOGIN or AUTH PLAIN |
| Max message size | 32 MB (server announces SIZE 33554432) |
| Extensions | 8BITMIME, SMTPUTF8 — non-ASCII recipients and bodies supported |
Authentication
The SMTP server uses your existing API key, presented as the password. The username is the literal string apikey:
Username: apikey
Password: bx_live_your_key_here
The same bx_live_… key you use for the HTTP API works for SMTP — no separate SMTP credentials. Keep the password secret; rotate via Settings → API Keys in the dashboard.
Make sure your default sender is set before testing SMTP — the relay uses your account’s default sender for the From: header regardless of what you put in MAIL FROM. See Before you send.
Examples
1import os, smtplib, ssl
2from email.message import EmailMessage
3
4msg = EmailMessage()
5msg["From"] = "Acme <hello@yourbrand.com>"
6msg["To"] = "customer@example.com"
7msg["Subject"] = "Welcome to Acme"
8msg.set_content("Thanks for signing up!")
9
10ctx = ssl.create_default_context()
11with smtplib.SMTP("smtp.brixus365.com", 587, timeout=15) as s:
12 s.starttls(context=ctx)
13 s.login("apikey", os.environ["BRIXUS_API_KEY"])
14 s.send_message(msg)What preview keys see
If you point an SMTP client at the relay with a bx_preview_… key, the connection succeeds and STARTTLS upgrades cleanly — but AUTH LOGIN fails:
< 220 STARTTLS ready
> AUTH LOGIN
< 535 5.7.8 Authentication credentials invalid
Preview keys are HTTP-only (and starter-templates-only). To send via SMTP, use a bx_live_… key from a free signup or paid plan — see Before you send.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Connection times out on port 587 | Outbound port 587 is blocked by your network or cloud provider | Try from a different network. Some hosting providers (Heroku, Railway, Render) block port 25 only — port 587 should be open |
535 Authentication credentials invalid | Wrong username, revoked key, or a bx_preview_… key (those don’t auth via SMTP) | Username is always apikey; password is your bx_live_… key. Re-copy from Settings → API Keys. Make sure the key has the emails:send permission (created via the Send emails (transactional) preset). |
550 5.7.1 No verified sender address configured | You haven’t set a default sender in the dashboard yet | Open Settings → Email Setup → Sender Addresses and click Set as Default on a verified sender. See Before you send. |
552 Message size exceeds 33554432 | Message body + attachments exceed 32 MB | Reduce attachment size or send the file via a download link instead |
451 Throttled — too many sends per minute | Per-minute send rate exceeded | Slow down. Server-side throttle protects deliverability |