Skip to content

worker-mailer/resend

Worker Mailer — Resend

English | Português

npm version License: MIT

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/resend

Quick Start

import { 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>',
})

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.

About

Worker Mailer Resend is a Resend email client for Cloudflare Workers, aligned with the API patterns from @workermailer/smtp.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors