Close-up of a MacBook keyboard and trackpad in low light.

PayloadCMS email integration

Published 10 June, 2025

Reliable and configurable email delivery is essential for applications that automate user communication and notification workflows. The adapter enables to integrate directly with the useSend email infrastructure, eliminating the need for external middleware. This integration supports both transactional and marketing email use cases through a secure and scalable configuration. This guide explains how to install the adapter, manage environment variables, and deploy it with hosted and self-managed useSend instances.


PayloadCMS

is an open-source, headless Content Management System engineered with Node.js and React. It adopts a code-first development paradigm, allowing content structures, access controls, and API behaviour to be defined directly in code. This model enhances maintainability, promotes version control, and aligns with modern software engineering practices.

Screenshot of the PayloadCMS admin panel showing a draft blog post titled "Breaking the Barrier: The Future of Launch Technology" with content and featured image displayed.

Features:

  • A fully customizable admin interface built in React
  • Support for both REST and GraphQL APIs
  • Native TypeScript integration for type safety and developer efficiency
  • Granular access control with built-in authentication strategies

PayloadCMS is purpose-built for teams requiring extensibility and control in content delivery systems. Its architecture supports both simple deployments and complex, high-traffic applications, making it suitable for marketing sites, SaaS platforms, internal tools, and enterprise-grade digital products.


Usesend

(formly Unsend) is an open-source email infrastructure platform designed to provide developers with full control over outbound email delivery through a REST API. It supports both transactional and marketing communications, offering a robust feature set for reliable and compliant email operations.

Screenshot of the useSend email dashboard.

Features:

  • Domain verification and management for authenticated sending
  • Engagement tracking, including email opens and link clicks
  • Subscription and unsubscribe management for list compliance
  • Seamless integration with Amazon Simple Email Service (SES) for high deliverability and scalability

useSend is engineered for deployment flexibility. It can be operated as a hosted solution or deployed on-premise, making it suitable for teams that prioritize data ownership, regulatory compliance, and cost-efficiency in their email infrastructure.


Adapter

Rubix Studios’ serves as a direct integration layer between PayloadCMS and the useSend email infrastructure. This adapter enables PayloadCMS to dispatch emails through useSend’s REST API without relying on intermediary services or custom middleware.

This integration is well-suited for use cases requiring:

  • Seamless email integration within PayloadCMS for transactional and marketing workflows
  • Support for self-hosted deployments and regulatory requirements, including GDPR and HIPAA compliance
  • Transparent, auditable, and fully extensible architecture built on open-source standards

Features:

The adapter provides key capabilities that simplify integration and enhance operational efficiency:

  • Integration
    Enables PayloadCMS to communicate directly with useSend’s REST API, allowing real-time email dispatch triggered by CMS events without middleware.
  • Flexibility
    Supports both hosted and self-managed useSend deployments, offering compatibility with varied infrastructure and regulatory environments.
  • Security
    Utilizes environment variables for API credentials and endpoints, ensuring secure credential management and simplified deployment processes.

Installation

To integrate the adapter with PayloadCMS:

Installation

shell
pnpm add @rubixstudios/payload-usesend


Configuration

In your payload.config.js, import and set up the adapter:

typescript
import { sendAdapter } from '@rubixstudios/payload-usesend';
 
export default buildConfig({
  email: sendAdapter({
    apiKey: process.env.USESEND_API_KEY!,
    useSendUrl: process.env.USESEND_URL!,
    defaultFromName: 'Rubix Studios',
    defaultFromAddress: 'example@rubixstudios.com.au',
  }),
});


Variables

Ensure the following variables are defined in your environment:

dotenv
USESEND_API_KEY=your_api_key
USESEND_URL=https://your-usesend-instance-url or https://app.usesend.com

Amazon SES

For self-hosted useSend deployments using Amazon SES:

IAM user

  • Go to AWS Console → IAM → Users → Add users
  • Choose programmatic access

Permissions
Attach the following policies:

  • AmazonSESFullAccess
  • AmazonSNSFullAccess
Screenshot of the AWS IAM console showing the final step in creating a user named "unsend," with AmazonSESFullAccess and AmazonSNSFullAccess permissions assigned.

Credentials

  • Navigate to the IAM user's Security credentials
  • Create and note the Access key ID and Secret access key

Variables
In your useSend deployment:

dotenv
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key

Advantages

Compared to SaaS-based email services such as Resend, useSend presents a strategic, developer-focused alternative with clear operational and financial benefits:

  • Efficiency
    By utilizing Amazon SES directly, useSend enables substantial cost reductions relative to subscription-based SaaS platforms, particularly in high-volume scenarios.
  • Ownership
    Self-hosted deployments provide complete control over email content and user data, supporting rigorous compliance with standards such as GDPR and HIPAA.
  • Customization
    As an open-source solution, useSend allows development teams to implement tailored features, integrations, and workflows aligned with specific organizational requirements.
  • Vendor
    Operating independently from third-party platforms mitigates vendor lock-in risks and ensures continuity despite service or pricing changes.

Contributions

The @rubixstudios/payload-usesend adapter is publicly available and actively maintained by Rubix Studios Pty. Ltd.

Developers are encouraged to in ongoing improvements by submitting enhancements, reporting bugs, or contributing to documentation.


The @rubixstudios/payload-usesend integration extends PayloadCMS with robust and configurable email capabilities, leveraging useSend’s infrastructure for scalable and cost-efficient delivery. By adopting this solution, development teams gain enhanced control, improved compliance alignment, and the flexibility to tailor email operations to project-specific needs.

Organizations are invited to support ongoing development by contributing to the open-source repository, enabling broader adoption and continued innovation.

Vincent is the founder and director of Rubix Studios, with over 20 years of experience in branding, marketing, film, photography, and web development. He is a certified partner with industry leaders including Google, Microsoft, AWS, and HubSpot. Vincent also serves as a member of the Maribyrnong City Council Business and Innovation Board and is undertaking an Executive MBA at RMIT University.