Cloud platforms like Render and Heroku block outbound SMTP ports (25, 465, 587) to prevent spam, causing email-sending code that works locally to fail in production. The solution is to use Brevo's HTTP REST API instead of Nodemailer/SMTP, since HTTPS traffic on port 443 is never blocked. A step-by-step Node.js/Express implementation shows how to set up Brevo's free tier (300 emails/day, no custom domain required), configure API keys, build a reusable sendEmail utility using native fetch(), and integrate it into a signup route that sends OTP verification emails.
Table of contents
OutlinePrerequisitesTools We’ll Be UsingThe Problem: Nodemailer and SMTP BlockingBackend SetupConclusionSort: