Menu

Send app emails through the Brevo SMTP relay with Node.js (Nodemailer)
📰

Send app emails through the Brevo SMTP relay with Node.js (Nodemailer)

DEV Community: node·Omni Genz·about 9 hours ago
#VGBz1cvo
#devtonodejs#devto#dev#smtp#brevo
Reading 0:00
15s threshold

A shorter, code-first version of a guide first published on Omni Genz .

If your app's password resets and order receipts keep vanishing, sending straight from your web server is often the problem. Big inboxes don't trust mail from a random host. An SMTP relay fixes that: your app hands the email to a server built for sending, and the relay delivers it.

Brevo (formerly Sendinblue) includes its SMTP relay on every plan, including the free one (300 emails a day, according to Brevo's pricing page). Here's how to wire it into a Node.js app.

1. Get your SMTP details

In Brevo, go to Settings > SMTP & API > SMTP . You need:

Setting Value

Host smtp-relay.brevo.com

Port 587 (try 2525 if your host blocks 587, or 465 for SSL)

Username The SMTP login shown on that page

Password An SMTP key , not your Brevo password and not an API key

Generate the SMTP key on the same tab. You only see it once, so put it straight into your secrets manager or .env file.

2.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.