@workermailer/resend
v0.1.0
Published
Resend email client for Cloudflare Workers, aligned with @workermailer/smtp API patterns.
Maintainers
Readme
Worker Mailer — Resend
Worker Mailer Resend is a Resend email client for Cloudflare Workers, aligned with the API patterns from @workermailer/smtp.
Features
- 🚀 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
Installation
npm i @workermailer/resendQuick Start
import { ResendMailer } from '@workermailer/resend'
const mailer = await ResendMailer.connect({
apiKey: 're_***',
from: 'Sender <[email protected]>',
})
await mailer.send({
from: 'Sender <[email protected]>',
to: '[email protected]',
subject: 'Hello from Resend',
text: 'This is a plain text message',
html: '<h1>Hello</h1><p>This is an HTML message</p>',
})Cloudflare Queues Integration
import { createQueueHandler } from '@workermailer/resend/queue'
export default {
async queue(batch) {
const handler = createQueueHandler()
const results = await handler(batch)
console.log('Processed emails:', results)
}
}Contributing
See CONTRIBUTING.md.
License
MIT. See LICENSE.
