Resend Mail Provider
This provider adds the official Resend SDK, validates RESEND_API_KEY with Zod, and exports a ready-to-use resend client.
Features
- Minimal env surface: API key only (extend
env.tsif you want a defaultfromaddress) - Shared
Resendinstance - MVC and Feature architecture variants
Installation Guide
npx servercn-cli add pr resend-mailFile Structure
MVC
-
src/configs/env.ts -
src/configs/resend.ts
Feature
-
src/shared/configs/env.ts -
src/shared/configs/resend.ts
Environment Configuration
src/configs/env.ts
Resend client
src/configs/resend.ts
Usage
Use a verified domain or Resend’s test sender for from.
To default the sender from env, add something like EMAIL_FROM: z.string() to envSchema alongside the API key (same pattern as the Nodemailer provider).