← All writing

Sending mail from a free domain: Resend said no, Brevo said yes, Gmail said 550

Receiving mail on a free domain was easy. Sending was a lesson: one service refused the domain, the next one took it, and Gmail turned the mail away anyway. Domain reputation is real.

·4 min read
Writing a reply in Keyhaven from a private alias, with the From field showing the alias.

Most of what my Keyhaven aliases do is receive: sign-up codes, receipts, newsletters. But sometimes I need to answer from one, like a support ticket opened with an alias, where replying from my real address would undo the point of having it.

Receiving on a free domain was the easy part. Sending took three services and taught me something I’d only read about before.

Resend: not this domain

Version 1.0.0 sent replies through Resend, which has a generous free plan (3,000 mails a month, 100 a day). But Resend refuses free domains like the one I use.

I can see why: free domains are popular with spammers, and a sending service lives or dies by its own reputation. So version 1.1.0 added Brevo. Resend still works as the alternative, if its key is the only one set.

Brevo: yes, after some DNS

Brevo’s free plan sends 300 mails a day, once Brevo has approved the account for sending. To send as my domain, Brevo first has to authenticate it, which means adding its DNS records in Cloudflare:

  • a Brevo verification code
  • two DKIM records, which sign each mail so receivers can check it really came from my domain
  • a DMARC record, which tells receivers what to do with mail that fails those checks
  • a few CNAME records Brevo asks for

All of them DNS only, not proxied through Cloudflare, and they sit happily next to the records Email Routing added for receiving. Along the way I also had to remove two stray records that didn’t belong there.

My first real send still failed: Brevo answered “sender not valid”. The domain wasn’t fully authenticated yet. Running the authentication again fixed it, and Brevo started accepting mail.

Two smaller things I prepared for:

  • Brevo can block API calls from IP addresses it doesn’t know. Keyhaven sends from a Cloudflare Function, which can call from many different addresses, so that check has to be off. If Brevo ever complains, the app says exactly which setting to change.
  • Reply headers (In-Reply-To, References) are what keep a reply in the same thread. If Brevo ever refuses them, Keyhaven sends the mail again without them, so the reply still arrives.

Every Brevo error becomes a plain sentence in the app: the domain isn’t authenticated, today’s 300 are used up, the IP isn’t allowed, the key is wrong, the account isn’t activated yet.

Gmail: 550-5.7.1

Then I sent a test to a Gmail address. Brevo said accepted. Keyhaven said sent. It never arrived.

Gmail had refused it with 550-5.7.1: it considered the message unsolicited. Mail to other, non-Gmail addresses was delivered fine.

The lesson is the difference between two things I used to blur together:

  • authentication (SPF, DKIM, DMARC) proves the mail really comes from my domain
  • reputation says whether that domain is worth trusting

I had the first, done properly. I had none of the second. A brand-new domain has no history at all, and a free one shares its address suffix with thousands of strangers, some of whom are surely spammers. Gmail weighs all of that, and a new free domain starts at nothing.

Proving who you are is not the same as being trusted. A brand-new free domain has done the first and not the second.

There’s no switch for reputation. It’s earned slowly, by sending mail that people actually want, over time.

What I did about it

About the reputation: honestly, not much, and that’s fine. Keyhaven’s main job is receiving, and that works everywhere. Replies to most places arrive. Replies to Gmail might not, for now.

The part I could fix was in the app: “accepted” is not “delivered”. Version 1.1.0 trusted Brevo’s first answer, so the Gmail bounce simply vanished. Version 1.3.0 fixed that:

  • every mail in Sent has a status: Queued, Delivered, Delayed, Bounced or Blocked
  • a failure comes with Brevo’s reason in plain words, what to do about it, and Brevo’s own words one click away
  • when I open Sent, Keyhaven asks Brevo’s read-only events log about recent mails (at most once per message every 10 minutes, for 3 days); or Brevo can call Keyhaven itself, through an optional webhook guarded by a secret key
  • the Inbox gets a red dot when a recent send failed, so I don’t have to remember to look

A sent mail in Keyhaven marked Bounced: the receiving server refused it as unsolicited (5.7.1), with what to do and Brevo’s own words below.

That picture is from my test copy, with Brevo mocked to bounce the way Gmail did. Now a bounce like that is the first thing I see, instead of something I find out a week later.

A note on privacy

Mail I receive is sealed the moment it arrives (how). Mail I send can’t be: it has to pass through Brevo readable, because Brevo has to deliver it. The copy kept in my Sent folder is sealed like everything else. To show the delivery status, the server keeps a few plain facts next to it: Brevo’s message id, the recipients, the status and Brevo’s reason, all things Brevo knows anyway. And only aliases on my own domain can send; the public temp-mail ones can only receive.