Framework Integration

Node.js + Unosend

Send emails from Node.js with our official SDK. Support for Express, Fastify, NestJS, and any Node.js application.

Features

Everything you need to send emails from Node.js

Promise-based API

Full TypeScript support

ESM and CommonJS compatible

Automatic retries

Works with any Node.js framework

Quick Start

Get up and running in minutes with this code example

Code Example
import { Unosend } from '@unosend/node';

const unosend = new Unosend(process.env.UNOSEND_API_KEY);

// Simple email
const { data, error } = await unosend.emails.send({
  from: 'hello@yourdomain.com',
  to: 'user@example.com',
  subject: 'Hello from Node.js',
  html: '<p>Hello World!</p>',
});

// With attachments
await unosend.emails.send({
  from: 'hello@yourdomain.com',
  to: 'user@example.com',
  subject: 'Your Invoice',
  html: '<p>Please find attached.</p>',
  attachments: [
    {
      filename: 'invoice.pdf',
      content: Buffer.from(pdfData),
    },
  ],
});

Setup Guide

Follow these steps to integrate Unosend with Node.js

1

Install the SDK: npm install @unosend/node

2

Set UNOSEND_API_KEY environment variable

3

Import and initialize Unosend

4

Call unosend.emails.send() with your email data

Why Use Unosend with Node.js?

Easy setup in any Node.js project

Support for all email features

Comprehensive error handling

Async/await friendly

Ready to integrate?

Start sending emails from Node.js in under 5 minutes. Free tier includes 5,000 emails/month.