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 nodemailerTransport
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 correctConnection reference
| Option | Value |
|---|---|
host | smtp.eusend.dev |
port | 465 (or 2465) |
secure | true |
auth.user | eusend |
auth.pass | your eusend API key (eu_live_…) |
from | an 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.
Rails SMTP
Configure Action Mailer to deliver through eusend over SMTP — mailers, Devise emails, and any deliver_now/deliver_later, DKIM-signed and tracked.
Ghost SMTP
Configure your Ghost blog to send transactional email — member sign-in links, password resets, staff invites — through eusend over SMTP.