Reliable and configurable email delivery is essential for applications that automate user communication and notification workflows. The @rubixstudios/payload-usesend adapter enables PayloadCMS 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.
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.
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.
Rubix Studios’ @rubixstudios/payload-usesend 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.
To integrate the adapter with PayloadCMS:
Installation
1pnpm add @rubixstudios/payload-usesend
Configuration
In your payload.config.js, import and set up the adapter:
1import { sendAdapter } from '@rubixstudios/payload-usesend';
2
3export default buildConfig({
4 email: sendAdapter({
5 apiKey: process.env.USESEND_API_KEY!,
6 useSendUrl: process.env.USESEND_URL!,
7 defaultFromName: 'Rubix Studios',
8 defaultFromAddress: 'example@rubixstudios.com.au',
9 }),
10});
Variables
Ensure the following variables are defined in your environment:
1USESEND_API_KEY=your_api_key
2USESEND_URL=https://your-usesend-instance-url or https://app.usesend.com
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
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:
1AWS_ACCESS_KEY_ID=your-access-key-id
2AWS_SECRET_ACCESS_KEY=your-secret-access-key
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.
The @rubixstudios/payload-usesend adapter is publicly available and actively maintained by Rubix Studios Pty. Ltd.
Developers are encouraged to participate 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.