rubix-studios-pty-ltd

payload usesend

by rubix-studios-pty-ltd
Email
v3
v4
^3.94.2 || ^4.0.0-beta.12
MIT

Overview

Summary generated from the README

Provides an email adapter for Payload that delivers messages through the REST API of useSend, an open-source and self-hostable email platform. It is set in the email option of the Payload config with an API key, base URL and default sender details. It supports Payload 3 and 4 beta.

Features

  • Sends Payload emails through the useSend REST API
  • Supports provider templates with template ID and variables
  • Scheduled delivery with an ISO 8601 date
  • Idempotency keys generated per send and reused across retries
  • Forwards custom email headers such as List-Unsubscribe
  • Optional limit on combined decoded attachment size

Use cases

  • Send transactional emails from Payload through a self-hosted useSend instance
  • Replace a hosted email provider with an open-source delivery platform
  • Schedule or template emails using useSend features 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

Today

Last Updated

618

Weekly Downloads

v1.7.0

npm Version

58.6 KB

Unpacked Size

0

Dependencies

GitHub stars

80 since Sep 6

Show data
GitHub stars by day (UTC)
DateStars
Dec 5, 20268
Dec 4, 20268
Dec 3, 20268
Dec 2, 20268
Dec 1, 20268
Nov 30, 20268
Nov 29, 20268
Nov 28, 20268
Nov 27, 20268
Nov 26, 20268
Nov 25, 20268
Nov 24, 20268
Nov 23, 20268
Nov 22, 20268
Nov 21, 20268
Nov 20, 20268
Nov 19, 20268
Nov 18, 20268
Nov 17, 20268
Nov 16, 20268
Nov 15, 20268
Nov 14, 20268
Nov 13, 20268
Nov 12, 20268
Nov 11, 20268
Nov 10, 20268
Nov 9, 20268
Nov 8, 20268
Nov 7, 20268
Nov 6, 20268
Nov 5, 20268
Nov 4, 20268
Nov 3, 20268
Nov 2, 20268
Nov 1, 20268
Oct 31, 20268
Oct 30, 20268
Oct 29, 20268
Oct 28, 20268
Oct 27, 20268
Oct 26, 20268
Oct 25, 20268
Oct 24, 20268
Oct 23, 20268
Oct 22, 20268
Oct 21, 20268
Oct 20, 20268
Oct 19, 20268
Oct 18, 20268
Oct 17, 20268
Oct 16, 20268
Oct 15, 20268
Oct 14, 20268
Oct 13, 20268
Oct 12, 20268
Oct 11, 20268
Oct 10, 20268
Oct 9, 20268
Oct 8, 20268
Oct 7, 20268
Oct 6, 20268
Oct 5, 20268
Oct 4, 20268
Oct 3, 20268
Oct 2, 20268
Oct 1, 20268
Sep 30, 20268
Sep 29, 20268
Sep 28, 20268
Sep 27, 20268
Sep 26, 20268
Sep 25, 20268
Sep 24, 20268
Sep 23, 20268
Sep 22, 20268
Sep 21, 20268
Sep 20, 20268
Sep 19, 20268
Sep 18, 20268
Sep 17, 20268
Sep 16, 20268
Sep 15, 20268
Sep 14, 20268
Sep 13, 20268
Sep 12, 20268
Sep 11, 20268
Sep 10, 20268
Sep 9, 20268
Sep 8, 20268
Sep 7, 20268
Sep 6, 20268
npm weekly downloads

635+356 since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 2026635
Dec 4, 2026603
Dec 3, 2026509
Dec 2, 2026499
Dec 1, 2026584
Nov 30, 2026790
Nov 29, 2026839
Nov 28, 2026845
Nov 27, 2026864
Nov 26, 2026745
Nov 25, 2026743
Nov 24, 2026731
Nov 23, 2026671
Nov 22, 2026652
Nov 21, 2026753
Nov 20, 2026874
Nov 19, 2026870
Nov 18, 2026912
Nov 17, 2026837
Nov 16, 2026707
Nov 15, 2026647
Nov 14, 2026520
Nov 13, 2026501
Nov 12, 2026455
Nov 11, 2026443
Nov 10, 2026613
Nov 9, 2026662
Nov 8, 2026633
Nov 7, 2026582
Nov 6, 2026451
Nov 5, 2026463
Nov 4, 2026427
Nov 3, 2026311
Nov 2, 2026484
Nov 1, 2026719
Oct 31, 2026730
Oct 30, 2026825
Oct 29, 2026787
Oct 28, 2026755
Oct 27, 2026751
Oct 26, 2026569
Oct 25, 2026582
Oct 24, 2026581
Oct 23, 2026456
Oct 22, 2026482
Oct 21, 2026551
Oct 20, 2026835
Oct 19, 2026791
Oct 18, 2026717
Oct 17, 2026735
Oct 16, 2026779
Oct 15, 2026764
Oct 14, 2026838
Oct 13, 2026609
Oct 12, 2026577
Oct 11, 2026370
Oct 10, 2026367
Oct 9, 2026327
Oct 8, 2026319
Oct 7, 2026220
Oct 6, 2026111
Oct 5, 2026115
Oct 4, 2026117
Oct 3, 2026138
Oct 2, 2026144
Oct 1, 2026173
Sep 30, 2026176
Sep 29, 2026203
Sep 28, 2026210
Sep 27, 2026382
Sep 26, 2026384
Sep 25, 2026379
Sep 24, 2026363
Sep 23, 2026327
Sep 22, 2026327
Sep 21, 2026382
Sep 20, 2026233
Sep 19, 2026191
Sep 18, 2026209
Sep 17, 2026216
Sep 16, 2026215
Sep 15, 2026233
Sep 14, 2026164
Sep 13, 2026137
Sep 12, 2026339
Sep 11, 2026348
Sep 10, 2026342
Sep 9, 2026337
Sep 8, 2026282
Sep 7, 2026278
Sep 6, 2026279

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

Health Score

82/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 Dec 5, 2026Created Sep 9, 2025Published Dec 1, 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(),
    // maxAttachmentBytes: 10 * 1024 * 1024,
    // 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 per logical send
maxAttachmentBytesnumberNo-Total decoded attachment size limit
scheduledAtstringNo-ISO 8601 scheduled delivery date
templateIdstringNo-Email template ID
variablesobjectNo-Email template variables

Notes

  • Idempotency keys default to a new UUID per send and are reused across internal retries. Use a stable callback for application-level retries. A static key is only appropriate for a single logical email; reusing it for different messages causes a conflict.
  • Configure the final useSend base URL directly. Redirects are not followed. Use HTTPS for remote deployments; HTTP remains supported for trusted self-hosted networks.
  • Attachments accept strings with an optional Node.js encoding or buffers. The optional size limit applies to their combined decoded byte length.

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

Similar plugins