Email platforms
Resend integration
A module you copy into your own server checks an email’s recipients before Resend sends it and hands it back without the addresses that cannot receive mail. A small tool does the same for your Resend contacts before a Broadcast, marking those contacts unsubscribed when you ask.
Read the full setup guideGet an API key
- Setup guide
- A module you download
import { precheckEmail } from './email-validation-resend';
const { email } = await precheckEmail(message, { apiKey: process.env.EV_API_KEY });
if (email) await resend.emails.send(email);At a glance.
- Status
- Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- For
- Developers who send with Resend and want sign-up, receipt and Broadcast mail kept away from addresses that would bounce and hurt their sending reputation.
- You need
- An API key of ours with Validate addresses (on by default); for the contacts tool, Node 22.18 or later and a Resend API key with Full access.
- Costs
- 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
- Full guide
- Read the full setup guide
Typical uses.
Before each send
precheckEmail checks to, cc and bcc, each distinct address once, and answers the email without the blocked recipients, or null when no to recipient is left.
A batch
precheckBatch does the same for the array of a batch send: the emails to send, in their order, and the positions of the ones dropped.
Contacts before a Broadcast
node resend.mjs reports the contacts it would set aside; with --apply it marks them unsubscribed, so Broadcasts skip them. It never deletes a contact.
Set it up. 4 steps.
The short version of the full setup guide, which stays the reference when a step does not match what you see.
Download and unzip
Download email-validation-resend.zip from the guide. It holds the module as TypeScript and as JavaScript, the contacts tool resend.mjs and the licence.
Copy the module
Put email-validation-resend.ts (or .mjs) into your server’s code and call precheckEmail before each send.
Try it without sending
Check no_mailbox@sandbox.email-validation.org with precheckEmail and log the answer: it is blocked as invalid. Never send to that address through Resend.
Your contacts
node resend.mjs --segment <id>reports; add--applyto mark the blocked contacts unsubscribed.
Good to know.
By default only a definite invalid is set aside; block adds disposable, catch_all or unknown. Everything else is sent as before.
It fails open: no key, a timeout, a network error or any error answer keeps the recipient, so a problem on our side never stops your mail.
Each check uses one credit, every time you call it; unknown results, malformed and sandbox addresses are free.
Resend’s unsubscribe is for the whole account: a contact the tool marks leaves every Broadcast.
Connect Resend.
Test it on our sandbox addresses for free, then on your own contacts.
Updated · Maintained by: Email Validation LLC