---
title: Send from a custom domain through Gmail
description: Wire Brevo SMTP into Gmail so replies leave as work@narayann.dev with SPF, DKIM and DMARC passing, without touching the setup that receives your mail.
tags: [email, dns, gmail, smtp, brevo]
type: blog
date: 2026-09-20
---

Gmail will send as `work@narayann.dev` once you give it an SMTP relay that is
allowed to send for the domain. Brevo is that relay. You authenticate the domain
in Brevo, create an SMTP key, and paste it into Gmail's **Send mail as**. Nothing
about incoming mail changes: it keeps arriving wherever it arrives today.

This is the sending half of [the custom email workflow](https://brain.narayann.dev/notes/productivity/email/custom-domain-email).
Receiving comes first and is covered in
[routing a custom domain into Gmail](https://brain.narayann.dev/notes/productivity/email/email-forwarding-spam-fix). The steps below
assume it is already working and that DNS for the domain lives in Cloudflare.

## The two halves

Incoming mail goes to your domain, hits the MX records in Cloudflare, and is
forwarded into your existing Gmail inbox. Outgoing mail leaves Gmail, goes
through Brevo SMTP, and reaches the recipient. The two paths never touch, which
is why you can change one without breaking the other.

Brevo is an SMTP relay, not a mailbox host. It cannot receive mail for you, so
nothing here replaces the Cloudflare side.

## Why Brevo

Any SMTP provider works here. Mailgun, SendGrid, Amazon SES, Postmark and
Resend all do the same job, and the Gmail side of this setup is identical
whichever one you pick. Only the hostname and credentials change.

Brevo is the one I would start with for personal mail, because its free tier is
the most generous of the lot for the volume one person sends, and it does not
ask for a card or a domain reputation review to get going. If you are sending
at scale or from an app, the others are worth comparing on price and
deliverability reporting.

## Authenticate the domain in Brevo

Brevo will not let you send as an address on a domain it cannot verify you own.

1. In Brevo, open **Settings → Senders & IPs → Domains**.
2. Add `narayann.dev` and choose manual authentication.
3. Brevo lists the DNS records it needs: a Brevo verification code, two DKIM
   records, and a DMARC record.
4. Add the verification code and both DKIM records in Cloudflare, alongside the
   records that are already there. Leave the existing ones alone.
5. Back in Brevo, click **Authenticate Domain** and wait for the domain to flip
   to authenticated.

Skip Brevo's DMARC record if you added one while setting up receiving. A domain
gets exactly one record at `_dmarc`, and a second one invalidates both. The
`p=none` record from that setup is enough.

SPF works the same way and it is the easier one to get wrong. Cloudflare already
added an SPF record when you turned on Email Routing, so put Brevo's include
into that record rather than creating a second one:

```text
v=spf1 include:_spf.mx.cloudflare.net include:spf.brevo.com ~all
```

Use the include Brevo actually shows you rather than copying the line above
blind, since providers change these. The rule that matters is one SPF record,
one `v=spf1`, both includes inside it.

The other way to lose an afternoon is deleting the Cloudflare MX records while
tidying up DNS. That kills receiving, and Brevo cannot cover for it.

## Add the sender

Open **Settings → Senders & IPs → Senders**, click **Add a sender**, and enter
`work@narayann.dev` with the name you want on outgoing mail. Brevo sends a
verification email to that address, and Cloudflare forwards it to your Gmail.
This is the step that fails if receiving is not working yet.

## Create an SMTP key

Open **Settings → SMTP & API** and create a new SMTP key in the SMTP section.
Copy it now, because Brevo shows it once. It is a credential that lets anything
holding it send as your domain, so treat it like a password.

While you are in there, check whether SMTP IP blocking is on. Gmail connects
from Google's infrastructure, not from your laptop, and those IPs change. There
is no useful address to whitelist, so leave IP blocking off or Gmail's
connection gets refused.

## Point Gmail at Brevo

In Gmail, open **Settings → Accounts and Import**, find **Send mail as**, and
click **Add another email address**.

1. Enter your name and `work@narayann.dev`. Leave **Treat as an alias** ticked.

2. Click **Next Step** and fill in the SMTP details:

   ```text
   SMTP Server: smtp-relay.brevo.com
   Port:        587
   Username:    your Brevo SMTP username
   Password:    your Brevo SMTP key
   Security:    TLS
   ```

3. Click **Add Account**.

The username is the one Brevo shows on the SMTP page. It is often not your Brevo
login email, and guessing it is the usual reason this step fails with an
authentication error.

Gmail then sends a verification email to `work@narayann.dev`. Open it, confirm,
and the address appears under **Send mail as**.

## Day to day

Leave your personal Gmail address as the default. Most mail should go out under
it, and switching is a dropdown away.

In **Settings → Accounts and Import**, set **When responding to a message** to
**Reply from the same address the message was sent to**. Work threads then stay
on the work address without you thinking about it, and everything else stays
personal.

To send work mail, pick `work@narayann.dev` from the **From** dropdown in the
compose window. You never open Brevo again after setup. It sits behind Gmail and
you keep using Gmail the way you already do.

## Verify it works

Send a test to an address on another provider, from `work@narayann.dev`.

Check the visible sender reads `work@narayann.dev` and not your personal
address. Then open the received message's full headers and confirm all three.
These are the headers on mail you sent, which is a different check from the one
in the receiving note. There, DKIM on forwarded mail can sit at neutral and that
is fine. On mail you send, DKIM should pass outright.

```text
SPF:   PASS
DKIM:  PASS
DMARC: PASS
```

If SPF fails, look for a second SPF record in Cloudflare. If DKIM fails, the
DKIM records are wrong or have not propagated yet. If DMARC fails while the
other two pass, check there is only one `_dmarc` record. If the headers expose
your personal Gmail address, the alias option was not ticked when you added the
address.

## Limits worth knowing

Brevo's free tier has a daily sending cap, and the number moves, so check the
current one before you rely on it. Going over it means mail stops leaving, and
Gmail's error message will not be obvious about why.

## References

* [Brevo SMTP relay documentation](https://developers.brevo.com/docs/smtp-relay)
* [Gmail: send mail from a different address](https://support.google.com/mail/answer/22370)
* [DMARC overview](https://dmarc.org/overview/)
