SMTP Relay | Brixus365 Docs
Docs API Reference SMTP Relay

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

SettingValue
Hostsmtp.brixus365.com
Port587 (STARTTLS)
EncryptionSTARTTLS — TLS upgraded after initial connection
AuthenticationAUTH LOGIN or AUTH PLAIN
Max message size32 MB (server announces SIZE 33554432)
Extensions8BITMIME, 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

Python
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

SymptomCauseFix
Connection times out on port 587Outbound port 587 is blocked by your network or cloud providerTry from a different network. Some hosting providers (Heroku, Railway, Render) block port 25 only — port 587 should be open
535 Authentication credentials invalidWrong 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 configuredYou haven’t set a default sender in the dashboard yetOpen Settings → Email Setup → Sender Addresses and click Set as Default on a verified sender. See Before you send.
552 Message size exceeds 33554432Message body + attachments exceed 32 MBReduce attachment size or send the file via a download link instead
451 Throttled — too many sends per minutePer-minute send rate exceededSlow down. Server-side throttle protects deliverability

Test locally first. Tools like smtp4dev or swaks let you debug SMTP exchanges without dispatching real email. Once your client speaks valid SMTP locally, repoint it at smtp.brixus365.com.