rubix-studios-pty-ltd

payload usesend

by rubix-studios-pty-ltd
Email
v3
^3.90.0
MIT

Overview

Summary generated from the README

An email adapter that connects Payload to the useSend REST API (formerly Unsend) for transactional and marketing email. It is set as the email option in the Payload config with an API key, base URL and default sender details. It requires a useSend account or self-hosted instance and Payload 3.90 or later.

Features

  • Sends Payload emails through the useSend REST API
  • Configurable default sender address and name
  • Supports useSend templates with template ID and variables
  • Optional scheduled delivery using an ISO 8601 date
  • Idempotency key support that stays the same across retries
  • Forwards custom email headers such as List-Unsubscribe

Use cases

  • Replace the default Payload email adapter with a self-hosted email delivery service
  • Send templated transactional emails such as welcome messages from Payload
  • Add unsubscribe headers to marketing emails sent from Payload

From the author

PayloadCMS adapter for sending emails via the useSend API (previously Unsend).

Installation

npm i @rubixstudios/payload-usesend

8

Stars

0

Forks

0

Open Issues

3 days ago

Last Updated

511

Weekly Downloads

v1.6.1

npm Version

36.6 KB

Unpacked Size

0

Dependencies

GitHub stars

Trends appear after 7 days of data. Daily snapshots have not started yet.

npm weekly downloads

Trends appear after 7 days of data. Daily snapshots have not started yet.

Each point is npm's rolling 7-day download count.

Health Score

84/100Excellent

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1053175524-root.svg)](https://payloaddirectory.dev/plugins/1053175524-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1053175524-root"><img src="https://payloaddirectory.dev/badge/1053175524-root.svg" alt="Payload Directory"></a>
Updated Oct 18, 2026Created Sep 9, 2025Published Oct 11, 2026

README

PayloadCMS + useSend Email Adapter

useSend is an API-first email delivery platform built for transactional and marketing email workflows. It adopts an architectural model comparable to Resend while remaining fully open source and self-hostable. This combination enables teams to standardise email delivery without surrendering control over infrastructure, deployment topology, or data locality.

The platform exposes a REST-based interface for email delivery and supports provider-native capabilities such as templates, dynamic variables, and scheduled sends. By abstracting the underlying delivery infrastructure, useSend simplifies application integration while allowing organisations to retain operational and regulatory control.

This adapter integrates PayloadCMS with the useSend REST API for transactional and marketing emails.

npm version Release

Documentation

See the full documentation for comprehensive guides, features, comparisons, and configuration examples.

Installation

pnpm add @rubixstudios/payload-usesend

Usage

  • Sign up for a useSend account
  • Set up a domain
  • Create an API key
  • Set API key as USESEND_API_KEY environment variable
  • Set your useSend base url as USESEND_URL environment variable
  • Configure your Payload config

Configuration

// payload.config.js
import { sendAdapter } from '@rubixstudios/payload-usesend'

export default buildConfig({
  email: sendAdapter({
    apiKey: process.env.USESEND_API_KEY!,
    defaultFromAddress: '[email protected]',
    defaultFromName: 'Rubix Studios',
    useSendUrl: process.env.USESEND_URL!,

    // Optional
    // idempotencyKey: () => crypto.randomUUID(),
    // scheduledAt: '2025-08-01T10:00:00Z',
    // templateId: 'template-uuid',
    // variables: { firstName: 'Vincent' },
  }),
})

Custom email headers are set on the email message itself and are forwarded to useSend as the headers object:

await payload.sendEmail({
  to: '[email protected]',
  from: 'Rubix Studios <[email protected]>',
  subject: 'Welcome',
  html: '<p>Hello</p>',
  headers: {
    'List-Unsubscribe': '<https://example.com/unsubscribe>',
    'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click',
  },
})
OptionTypeRequiredDefaultDescription
apiKeystringYes-useSend API key
useSendUrlstringYes-useSend base URL
defaultFromAddressstringYes-Default sender email
defaultFromNamestringYes-Default sender name
idempotencyKeystring | functionNoAutoUnique key reused across retries
scheduledAtstringNo-ISO 8601 scheduled delivery date
templateIdstringNo-Email template ID
variablesobjectNo-Email template variables

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support or inquiries:

Author

Rubix Studios
https://rubixstudios.com.au

Tags

Similar plugins