eusend
SMTP

Nodemailer SMTP

Send email from Node.js through eusend with Nodemailer over SMTP — implicit TLS on port 465, DKIM-signed and tracked.

Nodemailer is the standard way to send email from Node.js. Point its SMTP transport at eusend and every message is DKIM-signed, tracked, and subject to the same limits as the HTTP API.

Install

npm install nodemailer

Transport

mailer.ts
import nodemailer from 'nodemailer'

export const transport = nodemailer.createTransport({
  host: 'smtp.eusend.dev',
  port: 465,
  secure: true,              // implicit TLS — encrypted from the first byte
  auth: {
    user: 'eusend',          // always the literal string "eusend"
    pass: process.env.EUSEND_API_KEY,   // eu_live_…
  },
})

secure: true selects implicit TLS on port 465. Do not set secure: false (that expects STARTTLS on 587, which eusend does not support).

Send an email

await transport.sendMail({
  from: 'Acme <[email protected]>',   // must be a verified domain
  to: '[email protected]',
  subject: 'Your order has shipped',
  html: '<p>Order #1234 is on its way.</p>',
  text: 'Order #1234 is on its way.',
})

Attachments, cc, bcc, replyTo, and custom headers all work as usual — Nodemailer builds the MIME message and eusend relays it.

Verify the connection

await transport.verify()   // resolves if the host, port, and auth are correct

Connection reference

OptionValue
hostsmtp.eusend.dev
port465 (or 2465)
securetrue
auth.usereusend
auth.passyour eusend API key (eu_live_…)
froman address on a verified domain

For a richer typed API — batch sends, scheduling, templates, idempotency — use the Node.js SDK over the HTTP API instead. SMTP is best when a library or framework already speaks it.