eavan5

payload email ahasend

by eavan5
Email
v3
^3.0.0

Overview

Summary generated from the README

An email adapter for Payload CMS 3 that delivers outgoing mail through the AhaSend service. It is configured through the email option in the Payload config with an API key and default sender details. Version 2 of the AhaSend API additionally requires an account ID.

Features

  • Supports AhaSend API v1 and v2
  • Sends HTML and plain text emails
  • File attachments as Buffer, string or data URI
  • Custom headers and reply-to addresses
  • Multiple and named recipients
  • Detailed error information with failed recipients and success counts

Use cases

  • Send Payload transactional emails such as password resets through AhaSend
  • Switch an existing Payload project from another email provider to AhaSend

From the author

Payload Ahasend Email Adapter

Installation

npm i payload-email-ahasend

1

Stars

0

Forks

1

Open Issues

1 months ago

Last Updated

27

Weekly Downloads

v2.0.0

npm Version

107.0 KB

Unpacked Size

0

Dependencies

GitHub stars

10 since Sep 7

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

28+18 since Sep 7

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 6, 202628
Dec 5, 20265
Dec 4, 20266
Dec 3, 20265
Dec 2, 20264
Dec 1, 202614
Nov 30, 202613
Nov 29, 202612
Nov 28, 202612
Nov 27, 202611
Nov 26, 202611
Nov 25, 202611
Nov 24, 20261
Nov 23, 20261
Nov 22, 20263
Nov 21, 20263
Nov 20, 20262
Nov 19, 20263
Nov 18, 202610
Nov 17, 202610
Nov 16, 202612
Nov 15, 202610
Nov 14, 202613
Nov 13, 202613
Nov 12, 202620
Nov 11, 202613
Nov 10, 202613
Nov 9, 202611
Nov 8, 202612
Nov 7, 20269
Nov 6, 20269
Nov 5, 20263
Nov 4, 20263
Nov 3, 20263
Nov 2, 20263
Nov 1, 20262
Oct 31, 20262
Oct 30, 20262
Oct 29, 20260
Oct 28, 20260
Oct 27, 20260
Oct 26, 20261
Oct 25, 20261
Oct 24, 20261
Oct 23, 20261
Oct 22, 20262
Oct 21, 20262
Oct 20, 20262
Oct 19, 20261
Oct 18, 20261
Oct 17, 20261
Oct 16, 20261
Oct 15, 20261
Oct 14, 20261
Oct 13, 20262
Oct 12, 20262
Oct 11, 20264
Oct 10, 20264
Oct 9, 20264
Oct 8, 20264
Oct 7, 20264
Oct 6, 20263
Oct 5, 20263
Oct 4, 20261
Oct 3, 20261
Oct 2, 20263
Oct 1, 20262
Sep 30, 20262
Sep 29, 202610
Sep 28, 202610
Sep 27, 202610
Sep 26, 202613
Sep 25, 202611
Sep 24, 202613
Sep 23, 202613
Sep 22, 202613
Sep 21, 202613
Sep 20, 202614
Sep 19, 202611
Sep 18, 202611
Sep 17, 202610
Sep 16, 202611
Sep 15, 20263
Sep 14, 20266
Sep 13, 20267
Sep 12, 202611
Sep 11, 202611
Sep 10, 202610
Sep 9, 202610
Sep 8, 202610
Sep 7, 202610

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

Health Score

39/100Fair

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/944525693-root.svg)](https://payloaddirectory.dev/plugins/944525693-root)
HTML
<a href="https://payloaddirectory.dev/plugins/944525693-root"><img src="https://payloaddirectory.dev/badge/944525693-root.svg" alt="Payload Directory"></a>
Updated Oct 13, 2026Created Mar 7, 2025Published Mar 9, 2026

README

Payload CMS Ahasend Email Adapter

A custom email adapter for Payload CMS that integrates with the Ahasend email service API.

Features

  • Easy integration with Payload CMS
  • Support for AhaSend API v1 and v2
  • HTML and plain text emails
  • File attachments support
  • Custom headers
  • Reply-to functionality
  • Comprehensive error handling
  • TypeScript support
  • Compatible with Next.js 14+/15+/16+ and Payload CMS 3+

Requirements

  • Node.js 20.9.0+
  • Payload CMS 3.0.0+
  • Next.js 14.0.0+ (if using with Next.js)
  • React 18.2.0+ or 19.0.0+

Installation

npm install payload-email-ahasend
# or
yarn add payload-email-ahasend
# or
pnpm add payload-email-ahasend

Usage

API v1 (Default)

import { ahasendAdapter } from "payload-email-ahasend";
import { buildConfig } from "payload";

export default buildConfig({
  // ... other config options
  email: ahasendAdapter({
    apiKey: "your-ahasend-api-key",
    defaultFromAddress: "[email protected]",
    defaultFromName: "Your Company Name",
  }),
});

API v2

import { ahasendAdapter } from "payload-email-ahasend";
import { buildConfig } from "payload";

export default buildConfig({
  // ... other config options
  email: ahasendAdapter({
    apiKey: "your-ahasend-v2-api-key",
    defaultFromAddress: "[email protected]",
    defaultFromName: "Your Company Name",
    apiVersion: "v2",
    accountId: "your-account-id",
  }),
});

Environment Variables

AHASEND_API_KEY=your-api-key-here
AHASEND_ACCOUNT_ID=your-account-id-for-v2

Configuration Options

OptionTypeRequiredDescription
apiKeystring✅Your Ahasend API key
defaultFromAddressstring✅Default sender email address
defaultFromNamestring✅Default sender name
apiVersion'v1' | 'v2'❌API version to use (default: 'v1')
accountIdstringv2 onlyAccount ID for API v2

Email Features

The adapter supports:

  • HTML and plain text email content
  • File attachments (Buffer, string, and data URI)
  • Custom headers
  • Reply-to addresses
  • Multiple recipients
  • Named recipients (e.g., "John Doe <[email protected]>")

Error Handling

The adapter provides detailed error information including:

  • API response status
  • Failed recipients
  • Success/failure counts
  • Detailed error messages

TypeScript Support

The package includes full TypeScript definitions and interfaces for type safety.

Version Compatibility

VersionPayload CMSNext.jsReactNode.jsAhaSend API
2.0.0+3.0.0+14/15/1618.2+ / 19+20.9.0+v1 & v2
1.0.53.0.0+14/1518.2+ / 19+18.20.2+v1 only
1.0.43.25.0Any18.2+18.20.2+v1 only

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Similar plugins