Skip to main content
AutoSend x Nodemailer
Nodemailer is the most popular email sending library for Node.js. By integrating Nodemailer with AutoSend SMTP, you can send transactional emails from your Node.js applications with reliable delivery, full tracking, and detailed analytics.

Prerequisites

Verified Domain

Make sure you have a verified domain added in AutoSend to send emails from.

SMTP Key

Create a project-specific SMTP key from the SMTP tab in Project Settings.

Configuration

1

Install Nodemailer

Install the Nodemailer package using your preferred package manager:
2

Create the SMTP Transporter

Configure the Nodemailer transporter with your AutoSend SMTP credentials:
The SMTP password is no longer your API key. Create a project-specific SMTP key from the SMTP tab in Project Settings.
3

Send an Email

Use the sendMail method to send your email:
The from address must use a domain that is verified in AutoSend. For example, if you verified yourdomain.com, use an address like [email protected].
4

Verify Delivery

Check the Email Activity dashboard to verify your email was sent successfully. You’ll see delivery status, opens, clicks, and other engagement metrics.

Complete Examples


Advanced Usage

Sending with Attachments

Sending to Multiple Recipients

Plain Text and HTML

Troubleshooting

  • Verify your SMTP credentials are correct - Check that your sender email domain is verified in AutoSend - Ensure the from address matches a verified domain - Check your application logs for SMTP connection errors
  • Double-check your SMTP key is correct - Ensure you’re using autosend as the username - Verify your SMTP key is active in the SMTP Settings - Make sure there are no extra spaces in the credentials
  • Verify the hostname is smtp.autosend.com - Try using port 587 with secure: false if port 465 fails - Check if your network or firewall blocks outbound SMTP connections - Test connectivity: telnet smtp.autosend.com 465
  • Ensure your domain has proper DNS records (SPF, DKIM, DMARC) - Use a professional sender name and address - Check your domain reputation in AutoSend - Avoid spam trigger words in your email content

Next Steps

https://mintcdn.com/autosend-13920f5c/nx_wYfWx3qeZwg1C/icons/domain.svg?fit=max&auto=format&n=nx_wYfWx3qeZwg1C&q=85&s=9393f9f9b0f7029e6ba8acf2bc09d864

Verify Your Domain

Set up SPF, DKIM, and DMARC for better deliverability
https://mintcdn.com/autosend-13920f5c/nx_wYfWx3qeZwg1C/icons/email-activity.svg?fit=max&auto=format&n=nx_wYfWx3qeZwg1C&q=85&s=2ecad7369f217ee7d03c3d8dfdd36d22

Email Activity

Monitor your email delivery and engagement
https://mintcdn.com/autosend-13920f5c/nx_wYfWx3qeZwg1C/icons/webhook.svg?fit=max&auto=format&n=nx_wYfWx3qeZwg1C&q=85&s=14ad6675c71731ac04f786559a813ee1

Webhooks

Set up webhooks to track email events in real-time
https://mintcdn.com/autosend-13920f5c/nx_wYfWx3qeZwg1C/icons/smtp.svg?fit=max&auto=format&n=nx_wYfWx3qeZwg1C&q=85&s=d1993edda392d54c3f704a9a4bb04442

SMTP Introduction

Learn more about AutoSend SMTP configuration