---
title: Nodemailer
description: Send emails via Reloop SMTP using Nodemailer in Node.js.
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


# Nodemailer SMTP Integration

You can send emails through Reloop using **Nodemailer** in a Node.js environment.

[View complete runnable example on GitHub ↗](https://github.com/reloop-labs/reloop-examples/tree/main/smtp-nodemailer)

## Installation

Install Nodemailer:

```bash
npm install nodemailer
```

## Code Example

```javascript
const nodemailer = require('nodemailer');

const transporter = nodemailer.createTransport({
  host: 'smtp.reloop.sh',
  port: 587,
  secure: false, // true for port 465, false for other ports
  auth: {
    user: 'reloop',
    pass: process.env.RELOOP_API_KEY,
  },
});

async function main() {
  const info = await transporter.sendMail({
    from: '"Onboarding" <onboarding@reloop.sh>',
    to: 'delivered@resend.dev',
    subject: 'Hello from Nodemailer',
    html: '<p>Congrats on sending your first email via Reloop SMTP using Nodemailer!</p>',
  });

  console.log('Message sent: %s', info.messageId);
}

main().catch(console.error);
```

<RelatedTopics>
  <RelatedTopic icon="smtp" title="SMTP Integration Overview" href="/docs/examples/smtp/introduction" />
  <RelatedTopic icon="siPython" title="Python SMTP Guide" href="/docs/examples/smtp/python" />
  <RelatedTopic icon="siNextdotjs" title="Next.js Integration Guide" href="/docs/examples/nodejs/nextjs" />
</RelatedTopics>
