Integrations & Code Verified for 2026 Expert Reviewed

High-Throughput Bulk Email API for Node.js

Direct Answer Quick Summary for Senders:

To send high-throughput bulk emails in Node.js, use Nodemailer with connection pooling enabled (pool: true, maxConnections: 10, maxMessages: 50) pointing to 171mails' SMTP relay, or send asynchronous batches via the 171mails REST API using native fetch(). This architecture delivers thousands of messages per minute without socket exhaustion.

Key Takeaways

Enable connection pooling in Nodemailer to reuse TCP sockets and avoid TLS handshake latency.
Limit maximum concurrency to 10 connections per process to prevent destination throttling.
Handle backpressure using async streams or worker queues (BullMQ / BeeQueue).
171mails provides 4 Dedicated IPs and automated suppression scrubbing for Node.js developers.

1. Optimized Nodemailer Pooled Transport Configuration

const nodemailer = require('nodemailer');

const transporter = nodemailer.createTransport({
  host: 'relay.171mails.com',
  port: 587,
  secure: false, // TLS
  auth: {
    user: process.env.MAIL_USER,
    pass: process.env.MAIL_PASS
  },
  pool: true,              // Use connection pooling
  maxConnections: 10,      // Max concurrent sockets
  maxMessages: 50,         // Messages per connection before recycling
  rateDelta: 1000,         // Rate limit time window
  rateLimit: 25            // Max messages per second
});

2. Asynchronous Queue Processing with BullMQ

For production scale, pair Nodemailer with BullMQ and Redis to manage campaign bursts, retry failures with exponential backoff, and enforce strict hourly pacing:

const { Worker } = require('bullmq');

const emailWorker = new Worker('email-queue', async job => {
  await transporter.sendMail({
    from: '"171mails News" <news@yourdomain.com>',
    to: job.data.recipient,
    subject: job.data.subject,
    html: job.data.html
  });
}, { connection: redisConfig, concurrency: 10 });

3. REST API Batch Dispatching

For microservices where opening persistent SMTP sockets is impractical, 171mails provides a high-speed JSON REST endpoint capable of accepting batches of 1,000 recipients in a single HTTP POST request.

Frequently Asked Questions

ECONNRESET happens when you create a new SMTP transport for every message without connection pooling, exhausting local sockets and tripping firewall limits. Enabling pool: true resolves this.

A single Node.js worker process using pooled connections can dispatch between 5,000 and 15,000 emails per hour comfortably.

171mails provides standard REST API endpoints and code samples for native fetch(), Axios, and Nodemailer.
Enterprise Bulk Email Relay

Scale Node.js Email Infrastructure with 4 Dedicated IPs

Deliver mission-critical broadcasts and transactional alerts with enterprise Node.js SMTP pooling and REST APIs.

  • Connection-pooled SMTP and high-speed JSON REST APIs
  • 4 Dedicated IPs (2 IPv4 + 2 IPv6 dual-stack) up to 1M sends
  • 100M+ real-time suppression database scrubbing
  • Test your Node.js code with our $5 (₹399) sandbox
100K Email Plan
$29 /mo
4 Dedicated IPs Included

Related Questions & Guides

Platform, CRM & Stack Integrations
How to Send Bulk Emails in Python with smtplib & aiosmtplib

Send high-performance bulk emails in Python using aiosmtplib and asyncio. Master connection pooling, concur...

Platform, CRM & Stack Integrations
Bulk Email API for PHP & PHPMailer Integration Guide

Connect PHP and PHPMailer to high-performance SMTP relays. Learn SMTPKeepAlive, timeout tuning, batch proce...

Volume, Scaling & Rate Limits
SMTP Concurrency, Connections & Rate Limits: Complete Guide

Master SMTP concurrency limits, connection pools, and MX rate limits. Learn optimal settings for Postfix, P...

Volume, Scaling & Rate Limits
How to Calculate SMTP Hourly Sending Rate (Formula & Guide)

Calculate your optimal SMTP hourly sending rate using the 171mails 400-hour formula. Prevent ISP deferrals ...