Email Sender
Transactional email service with React email templates, queue-based sending, retry logic, and delivery tracking. Supports Resend, SendGrid, and SMTP providers.
Node.jsIntegrationsBuilt with OpenClaw
1.1k
Stars
5.9k
Installs
3
Deps
2
Comments
Install / Copy
npx create-freestack-module email-senderCode Preview
index.tsx
import { Resend } from "resend";
import { render } from "@react-email/render";
import { WelcomeEmail } from "./templates/welcome";
const resend = new Resend(process.env.RESEND_API_KEY);
interface EmailJob {
to: string;
template: string;
data: Record<string, any>;
}
export async function sendEmail(job: EmailJob) {
const templates = { welcome: WelcomeEmail, invoice: InvoiceEmail, reset: ResetEmail };
const Template = templates[job.template];
const html = await render(<Template {...job.data} />);
const result = await resend.emails.send({
from: "noreply@yourapp.com",
to: job.to,
subject: Template.subject(job.data),
html,
});
await logDelivery(result.id, job);
return result;
}GR
growtheng4 days ago
Switched from SendGrid to Resend using this module. Migration took 20 minutes.
DE
devopspro1 week ago
The BullMQ integration for queuing is solid. Handles our 10k daily emails no problem.