---
title: "Nodemailer"
description: "Send from any Node.js app with the most popular SMTP client."
url: https://www.unitpost.com/guides/smtp/nodemailer
section: SMTP
updated: 2026-07-24
---
# Nodemailer

## Connection settings

- **Host**: smtp.unitpost.com
- **Username**: unitpost (always this literal value)
- **Password**: Your Unitpost API key (must carry emails:send)
- **Port (STARTTLS)**: 587 (or 2587 if blocked)
- **Port (implicit TLS)**: 465 (or 2465 if blocked)
- **From address**: Any address on a verified domain

## Nodemailer

> Send from any Node.js app with the most popular SMTP client.

Configure a Nodemailer transport pointed at Unitpost and send your first message in a few lines.

### 1. Install Nodemailer

Add it to your Node.js project (Node 14+).

```bash
npm install nodemailer
```

### 2. Create a transport

Point the transport at `smtp.unitpost.com`. Use port 587 with `secure: false` for STARTTLS, or port 465 with `secure: true` for implicit TLS. The username is always `unitpost`; the password is your API key.

```javascript
import nodemailer from "nodemailer";

const transporter = nodemailer.createTransport({
  host: "smtp.unitpost.com",
  port: 587,
  secure: false, // STARTTLS
  auth: {
    user: "unitpost",
    pass: process.env.UNITPOST_API_KEY,
  },
});
```

### 3. Send an email

The `from` address must be on a domain you've verified in Unitpost.

```javascript
await transporter.sendMail({
  from: "you@yourdomain.com",
  to: "customer@example.com",
  subject: "Hello from Unitpost",
  html: "<h1>Welcome!</h1><p>Sent via SMTP.</p>",
});
```

### 4. Verify it in the dashboard

Open Activity in your Unitpost dashboard — the message appears alongside API sends, with delivery, open, and click status.

## Related

- [Supabase Auth](https://www.unitpost.com/guides/smtp/supabase): Deliver Supabase auth emails (magic links, confirmations) via Unitpost.
- [WordPress](https://www.unitpost.com/guides/smtp/wordpress): Route all WordPress email through Unitpost with an SMTP plugin.
- [Auth0](https://www.unitpost.com/guides/smtp/auth0): Send Auth0 verification, welcome, and reset emails via Unitpost.
