Worker Mailer Resend is a Resend email client for Cloudflare Workers, aligned with the API patterns from @workermailer/smtp.
- 🚀 Cloudflare Workers-compatible (fetch-based)
- 📝 Full TypeScript type support
- 📧 Sends HTML/text email with attachments via Resend
- 📬 Optional Cloudflare Queues integration for async email processing
npm i @workermailer/resendimport { ResendMailer } from '@workermailer/resend'
const mailer = await ResendMailer.connect({
apiKey: 're_***',
from: 'Sender <sender@acme.com>',
})
await mailer.send({
from: 'Sender <sender@acme.com>',
to: 'recipient@acme.com',
subject: 'Hello from Resend',
text: 'This is a plain text message',
html: '<h1>Hello</h1><p>This is an HTML message</p>',
})import { createQueueHandler } from '@workermailer/resend/queue'
export default {
async queue(batch) {
const handler = createQueueHandler()
const results = await handler(batch)
console.log('Processed emails:', results)
}
}See CONTRIBUTING.md.
MIT. See LICENSE.