Security basics
Resend "You can only send testing emails to your own email address"
Resend "You can only send testing emails to your own email address" means you still send from onboarding@resend.dev. The fix, and where the key belongs.

In short
- Resend "You can only send testing emails to your own email address" means your app still sends from onboarding@resend.dev, a test address that only delivers to the email your Resend account belongs to.
- The fix is to verify a domain you own in Resend and send from an address at it. Resend says a domain often verifies within 15 minutes, and that DNS changes can take up to 72 hours.
- Check where your Resend key lives before you verify. Once a domain is verified, anyone holding the key can send from it, so the key belongs in a secret on a server and never in your app's frontend code.
You built an app with Lovable, Bolt, v0, Cursor, Claude Code or Replit and connected Resend to send its emails. You tried the sign-up form yourself, the welcome email arrived, and you shared the link. Then your first real customer signs up and nothing reaches them. Resend's Logs page, or the logs of the function that sends the email, has the reason:
You can only send testing emails to your own email address (you@example.com).
To send emails to other recipients, please verify a domain at resend.com/domains, and change the `from` address to an email using this domain.
Resend "You can only send testing emails to your own email address" means your
app is still sending from onboarding@resend.dev, the test address every Resend
account starts with. Mail from it reaches exactly one inbox: the one your Resend
account belongs to. Your own test worked because that inbox was yours.
The usual advice stops at "verify your domain", and that is the fix. Verifying a domain also changes what your Resend API key can do. Resend's page on leaked keys says whoever holds your key can "send from any domain you've verified". Until you verify, the account has no domain of yours for anybody to send from. Afterwards it does. So before you fix the error, find out where your key lives.
Think of Resend as a post office that sends letters in your name. Until you
prove which name is yours, it only posts letters back to you, and
onboarding@resend.dev is its practice envelope. Verifying a domain is showing
your ID, in the form of DNS records that only the owner of the domain can add.
Your API key is the account card you hand over at the counter, and the post
office sends whatever the person holding that card asks for.
What does "You can only send testing emails to your own email address" mean?
It means Resend refused the email because the from address is on
resend.dev and the person it was for is somebody other than you.
Resend's list of API errors
gives this refusal as HTTP 403 with the type validation_error. Its
help page for the error
states the rule: the resend.dev domain "is only available for testing
purposes" and "can only send emails to the email address associated with your
Resend account". The address in brackets in the message is that email, and it
is the one inbox your app can reach today.
If you connected Resend through Lovable, its Resend connector page puts it the same way: Resend delivers to your app's users "only from a domain you have verified in Resend".
Two things make this easy to miss until a customer writes in:
- Resend's own Node.js example sends from
Acme <onboarding@resend.dev>, and code written from that example keeps the line until somebody changes it. - Resend's Node.js library returns the refusal in an
errorvalue, next to an emptydata. A form that never readserrortells your customer the email is on its way.
Before you verify a domain, check where your Resend key lives
Your Resend key belongs in a secret on a server, such as a Supabase Edge Function. It never belongs in the code your app sends to the browser.
Resend lists what a stranger holding your key can do once a domain is verified: "send from any domain you've verified, spend your monthly quota" and "damage the sending reputation you've built". That reputation is the record mailbox providers keep of how mail from your domain was received, and it is part of what decides whether your real password resets land in the inbox or in spam.
A key reaches the browser in one of two ways:
- It was put in a public variable. A name starting
VITE_orNEXT_PUBLIC_tells the build to copy the value into the page. Vite's own docs warn that these values "are bundled into your source code at build time" and should not hold API keys. How that prefix works has the details. - The page called Resend itself. Browsers block calls to Resend's API. Its
CORS help page
shows the error, "No 'Access-Control-Allow-Origin' header is present on the
requested resource", and tells you to "Send the emails on the server-side to
not expose your API keys". If you ever saw that error name
api.resend.com, your app once tried to call Resend from the browser, and the key was in the page to do it.
How to check whether your Resend key is in your app's code
Search the code your live app sends to every visitor. You need a desktop browser and nothing else.
- Open your published app at its real address, not the builder's preview, and press F12 to open the developer tools.
- Press Ctrl+Shift+F (Cmd+Option+F on a Mac) to search every file the page loaded.
- Search for
api.resend.com, then forre_. Resend's own examples write a key asre_followed by letters and digits, so are_inside quotes with a long run of characters after it is a key. - In your project's environment variables, look for a name with
RESENDin it that startsVITE_orNEXT_PUBLIC_. That is a key the build was told to put in the page.
Our free scan does the same reading for the keys it recognises by their shape: Stripe, OpenAI, Anthropic, AWS, Google and Supabase's secret key. It takes about 20 seconds and needs no account: scan your app. It has no rule written for Resend keys, so for this one the search above is the check.
If the key was in the browser, replace it before you verify
Remove the old key in Resend first, then make a new one and keep it on a server. Every visitor who loaded the page already has a copy, and taking the line out of your code leaves those copies working.
Resend's leaked-key page gives the order:
- Remove the old key. On the API Keys page, find it by its "last used" indicator, then choose More options and Remove API key.
- Create a key with Sending access. Resend says to prefer it over Full access. A sending key can only send email, and Resend says it "can't read your contacts even if it leaks". You can also limit a new key to one domain.
- Store it as a secret on a server. For a Supabase app that is an Edge Function, and moving a secret to an Edge Function walks through the steps and the lock the function needs afterwards.
- Read what was sent. The Logs page filters by API key and by date, and the Emails page shows recipients, subjects and what happened to each one. Resend keeps 30 days of this.
When you move the sending into a function, let the function decide who the email goes to: the signed-in user's own address, or a fixed one such as your support inbox. A function that sends any message the page asks for, to any address the page names, lets a stranger use your domain without ever seeing the key.
How to verify a domain in Resend
Add the domain on Resend's Domains page, copy the DNS records it shows into your DNS provider, and wait for Resend to see them. Resend's guide to adding a domain has every step. These are the places people get stuck:
- Send from a subdomain. Resend recommends one, such as
updates.yourdomain.com, which keeps the reputation of your app's mail apart from the rest of your domain's. - Copy the records exactly. They are TXT records plus an MX or a CNAME, for SPF and DKIM, the two checks a receiving mail server uses to confirm that Resend may send for your domain.
- Switch off Cloudflare's proxy (the orange cloud) on any CNAME record Resend gives you, or verification does not finish.
- Allow up to 72 hours. Resend says a domain often verifies within 15 minutes, and that DNS changes can take up to 72 hours. After that, Restart verification on the domain checks again.
- Send from the domain you verified. In Resend's words, "If you only verify a subdomain, you must send from an address at that subdomain, not your root domain."
Then change the from line to an address at the verified domain, for example
Your App <hello@updates.yourdomain.com>. Change it before the domain verifies
and Resend refuses with a different 403: "The domain.com domain is not
verified. Please, add and verify your domain." Once the domain is verified,
Resend asks you to add a DMARC record as well, which tells receiving servers
what to do with mail that fails those two checks.
If Resend also sends your Supabase sign-up emails, as Supabase's custom SMTP, the sender address in Supabase's SMTP settings needs the same change. Supabase's email rate limit covers that side of the setup.
Keeping secret keys out of your app after this fix
Reeve reads your live app from outside, once for free and then every hour if you want it to.
The free scan reads your live app the way a stranger can.
- It reads the code your published site sends to every visitor, with nothing to install.
- It names the secret keys it recognises there, from Stripe, OpenAI, Anthropic, AWS, Google and Supabase, and marks the publishable ones that are meant to be in the page.
- No account needed. Scan your app free in 20 seconds.
Monitor keeps reading after you stop.
- It runs the full security check again every hour, so each new deploy is read for keys without you starting a scan.
- It checks your site every 60 seconds and tells you by email, Telegram or Slack when it stops answering.
- See how Monitor works.
What to do now
What to do
- Find the
fromline in the code that sends your email.onboarding@resend.devonly ever reaches your Resend account's own address. - Search your live app for
api.resend.comandre_before you verify anything. A Resend key belongs in a secret on a server. - If the key is in the page, remove it in Resend, create a new one with Sending access, and check the Logs page for mail you did not send.
- Verify a subdomain on Resend's Domains page, copy the records exactly, and allow up to 72 hours.
- Change
fromto an address at the verified domain, and make your form read Resend'serrorbefore it tells anyone the email went out.
Start with the search in your live app. If the key is there, replace it first and verify the domain second. Then scan your app for the other keys it may be carrying.
FAQ
What does "You can only send testing emails to your own email address" mean in Resend?
Your app is sending from onboarding@resend.dev, the test address every Resend account starts with, and that address only delivers to the email your Resend account belongs to. Resend refuses every other recipient with HTTP 403 and the type validation_error. Verify a domain you own and send from an address at it.
Can I email my users from Resend without verifying a domain?
No. Resend keeps the resend.dev domain for testing, and it delivers only to your account's own address. To reach anyone else, add your domain on the Domains page in Resend, add the DNS records it lists at your DNS provider, and change the from address to one at that domain.
How long does Resend domain verification take?
Resend says a domain often verifies within 15 minutes of adding the DNS records, and that DNS changes can take up to 72 hours to spread. If it has not verified by then, check that every record matches exactly and press Restart verification. On Cloudflare, switch off the proxy for any CNAME record Resend gave you.
Can I call Resend from my app's frontend?
No. Browsers block calls to Resend's API, and Resend tells you to send from the server so your key is not exposed. A key in your frontend code can be copied by any visitor, and once your domain is verified, whoever has the key can send mail from that domain.
Which permission should my Resend API key have?
Sending access. Resend recommends it over Full access: a sending key can only send email, and Resend says it cannot read your contacts even if it leaks. When you create a key you can also limit it to the one domain your app sends from.