eusend-dev

eusend payload

by eusend-dev
Email
v3
v4
^3.0.0 || ^4.0.0

Overview

Summary generated from the README

An email adapter for Payload that routes all outgoing mail through the eusend REST API instead of SMTP, so it works on serverless hosts. It is set as the email option in the Payload config with an API key and default sender. Supports Payload 3 and 4, and the sender domain must be verified on the eusend account.

Features

  • Sends verification, password reset and payload.sendEmail messages via the eusend REST API
  • Supports attachments as buffers, strings, remote URLs or local file paths, plus cid references
  • Optional recipient override to redirect all messages to one address
  • Adds custom tags to every send and overrides open and click tracking
  • Throws Payload APIError with HTTP status and eusend error code on failure

Use cases

  • Send Payload transactional emails from serverless deployments where SMTP is unavailable
  • Keep email delivery and storage inside the EU for GDPR-minded projects
  • Redirect all emails to a test address while developing or staging

From the author

Payload CMS email adapter for eusend — EU-native transactional email, delivered from the EU.

Installation

npm i @eusend_dev/payload-email

1

Stars

0

Forks

0

Open Issues

1 months ago

Last Updated

4

Weekly Downloads

v0.1.0

npm Version

26.8 KB

Unpacked Size

1

Dependencies

GitHub stars

Trends appear after 7 days of data. Collecting since Oct 22 — 1 daily snapshot so far.

npm weekly downloads

Trends appear after 7 days of data. Collecting since Oct 22 — 1 daily snapshot so far.

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

Health Score

55/100Good

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

README

@eusend_dev/payload-email

Payload CMS email adapter for eusend — EU-native transactional email, sent and stored inside the EU.

It talks to the eusend REST API rather than SMTP, so it works on serverless the way @payloadcms/email-nodemailer does not.

npm install @eusend_dev/payload-email
import { buildConfig } from 'payload'
import { eusendAdapter } from '@eusend_dev/payload-email'

export default buildConfig({
  email: eusendAdapter({
    apiKey: process.env.EUSEND_API_KEY || '',
    defaultFromAddress: '[email protected]',
    defaultFromName: 'Your app',
  }),
})

Every email Payload sends — verification, password reset, and anything you send yourself with payload.sendEmail() — then goes through eusend.

Options

OptionRequiredWhat it does
apiKeyyesAn eusend API key.
defaultFromAddressyesSender used when a message sets no from. Its domain must be verified on your eusend account.
defaultFromNameyesDisplay name paired with defaultFromAddress.
overrideRecipientAddressnoRedirect every message to one address. cc and bcc are dropped with the real recipients.
tagsnoTags added to every send, e.g. { source: 'payload' }. They filter the log and reach webhooks.
trackOpens / trackClicksnoPer-adapter tracking overrides. Defaults to whatever the account is configured for.
baseUrlnoOverride the API host. Only useful against a staging deployment.

Attachments

payload.sendEmail() takes nodemailer's attachment shape, and all four forms work:

await payload.sendEmail({
  to: '[email protected]',
  subject: 'Your invoice',
  html: '<p>Attached.</p>',
  attachments: [
    { filename: 'invoice.pdf', content: pdfBuffer }, // raw bytes
    { filename: 'notes.txt', content: 'plain text' }, // encoded for you
    { path: 'https://example.com/invoice.pdf' }, // fetched at send time
    { path: '/var/data/invoice.pdf' }, // read from disk
  ],
})

A string content is read as UTF-8 unless you pass encoding: 'base64', matching nodemailer rather than assuming the string is already base64. Set cid to reference an attachment from your HTML as <img src="cid:...">.

Errors

A failed send throws Payload's APIError with the HTTP status and the eusend error code:

Error sending email: DOMAIN_NOT_VERIFIED - Domain not verified

The error-code reference explains each one.

MIT

Similar plugins