---
title: How to Send Email from n8n (SMTP Node or Email API) | SendHQ
description: Send email from n8n with the Send Email SMTP node or an HTTP Request to an email API. Steps, retry-safe keys, delivery checks and fixes for SMTP timeouts.
canonical: https://sendhq.cc/blog/send-email-from-n8n
last-updated: 2026-11-28
author: Dhrumil Barot
author_bio: Dhrumil is an email marketing expert. Dhrumil built SendHQ so developers and AI agents can send, receive and track email without fighting deliverability on their own.
published: 2026-11-28
updated: 2026-11-28
---
# How to Send Email from n8n (SMTP Node or Email API)

By [Dhrumil Barot](https://sendhq.cc/about.md#founder), Founder

Send email from n8n with the Send Email SMTP node or an HTTP Request to an email API. Steps, retry-safe keys, delivery checks and fixes for SMTP timeouts.

Published November 28, 2026 · Updated November 28, 2026

**TL;DR:** You can send email from n8n two ways: the built-in Send Email node, which talks SMTP, or the HTTP Request node, which calls an email API over HTTPS. With SendHQ you send through the HTTP Request node to `POST https://sendhq.cc/api/v1/emails` with an `Idempotency-Key`, then read the delivery result back from the API or a webhook. Use SMTP for a quick internal alert; use an API when the email matters to a customer.

[Create a SendHQ workspace and send your first email from n8n](https://sendhq.cc/pricing.md)

To send email from n8n, add a **Send Email** node, create an SMTP credential (host, port 465 with SSL/TLS on or 587 with it off, user and password), and map From, To, Subject and the body. That works for any mailbox with SMTP access. It stops working well in three cases: when your host blocks SMTP ports (DigitalOcean blocks 25, 465 and 587 on every Droplet), when you need replies in the same thread (the node cannot set `In-Reply-To` or `References`), and when you need to know whether the email was delivered. For those, send with the **HTTP Request** node to an email API. This guide shows both, with SendHQ as the API example, and was checked against the n8n and SendHQ docs on 2026-11-28.

## Should you use SMTP or an email API in n8n?

Use the Send Email (SMTP) node when the email goes to you or your team and a lost message is not a problem. Use an email API through the HTTP Request node when the email goes to customers, when a retry must not send twice, or when the workflow has to react to a bounce.

| Need | Send Email node (SMTP) | HTTP Request to SendHQ API |
| --- | --- | --- |
| Transport | SMTP on 465, 587 or 25 | HTTPS on 443 |
| Works where SMTP ports are blocked | No | Yes |
| Reply in an existing thread | No: no `In-Reply-To` or `References` ([n8n docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.sendemail)) | Yes: `reply_to_email_id` sets the thread headers |
| Safe retry without a duplicate | No built-in key | `Idempotency-Key` header, replay returns the first result |
| Delivery and bounce result | SMTP acceptance only | `delivered`, `bounced`, `complained` events and webhooks |
| Human approval step | Yes: Send and Wait for Response | Not built in; use n8n Wait or Form nodes |
| Cost | Your mailbox or SMTP provider | From $9/month, 50,000 emails ([pricing](https://sendhq.cc/pricing.md)) |

![Two ways to send from n8n: SMTP node for internal alerts, HTTP Request to an API for customer email](https://cdn.sanity.io/images/l4lj7ros/production/85ea5f7da837fc6468ea7cdd52d876629c05fb38-1344x326.png?w=1280&auto=format)

The email id returned on send is what you use to check delivery later.

## What SendHQ adds to an n8n workflow

SendHQ is an email API with a REST contract that an n8n HTTP Request node can call directly. For this job the parts that matter are:

- **One endpoint to send.** `POST https://sendhq.cc/api/v1/emails` with `Authorization: Bearer re_...` returns `201` with `id`, `providerMessageId` and `threadId` ([quickstart](https://sendhq.cc/docs/quickstart.md)).
- **Retry-safe sends.** An `Idempotency-Key` of up to 200 characters makes n8n's **Retry on Fail** safe: the same key with the same JSON replays the stored response with `Idempotent-Replayed: true`, and a changed payload under the same key returns `409` ([sending docs](https://sendhq.cc/docs/sending.md)).
- **Real threading.** Set `reply_to_email_id` and SendHQ derives `Message-ID`, `In-Reply-To` and `References`, which the Send Email node cannot set.
- **Delivery state.** Every email moves through `queued`, `sent`, `delivered`, `bounced`, `complained` or `failed`; read it with `GET /emails/:id/events` or receive signed webhooks.
- **Verified domains only.** You can only send from a domain whose DKIM, SPF and DMARC records you published. There is no free allowance: sending needs a paid plan (Starter is $9/month for 50,000 emails and 25 domains).

SendHQ has no dedicated n8n node today, so the setup below uses the core HTTP Request node, which every n8n install has.

## What you need

- n8n Cloud or self-hosted n8n, any current 1.x version with the HTTP Request node.
- A SendHQ workspace on a paid plan, with an API key from **API keys** in the dashboard.
- A sending domain added under **Domains** and verified (DKIM, SPF with `include:amazonses.com` merged into any existing SPF record, DMARC).

## Step by step: call the SendHQ API from an HTTP Request node

Six steps take you from an empty workflow to a sent, tracked email.

1. **Create a Header Auth credential.** In n8n, go to **Credentials > Add credential > Header Auth**. Set **Name** to `Authorization` and **Value** to your key with the Bearer prefix:

```
   Name:  Authorization
   Value: Bearer re_your_key_here
```

The key stays in n8n's credential store, not in the workflow JSON, so exporting or sharing the workflow does not leak it.

1. **Add an HTTP Request node** after your trigger and set:

```
   Method:                 POST
   URL:                    https://sendhq.cc/api/v1/emails
   Authentication:         Generic Credential Type > Header Auth
   Send Headers:           on
   Send Body:              on, Body Content Type: JSON, Specify Body: Using JSON
```

1. **Add the idempotency header.** Under **Send Headers**, add one header. Build the key from something stable in your data, such as the user ID and the reason for the email, never from the time:

```
   Name:  Idempotency-Key
   Value: welcome-{{ $json.userId }}
```

1. **Write the JSON body.** Switch the JSON field to an expression and map your fields. The `from` address must be on your verified domain:

```
   {
     "from": "Acme <hello@mail.acme.com>",
     "to": ["{{ $json.email }}"],
     "subject": "Welcome to Acme, {{ $json.firstName }}",
     "html": "<p>Hi {{ $json.firstName }}, your account is ready.</p>",
     "text": "Hi {{ $json.firstName }}, your account is ready."
   }
```

Send both `html` and `text`. SendHQ can generate text from HTML, but an authored text part is more reliable.

1. **Turn on retries.** In the node's **Settings**, enable **Retry on Fail**, set **Max Tries** to `3` and **Wait Between Tries (ms)** to `5000`. Because the idempotency key and body are identical on each try, a retry after a timeout cannot send the email twice.
2. **Run it and keep the ID.** Click **Execute step**. A `201` response looks like this:

```
   {
     "id": "em_…",
     "providerMessageId": "provider-id",
     "threadId": "em_…"
   }
```

Store `id` next to the record that caused the email (a Google Sheet row, a database row, a CRM note). You need it to check delivery.

## The SMTP route: Send Email node setup and why it times out

The Send Email node is the fastest route when you already have a mailbox with SMTP access.

1. Add a **Send Email** node and create an **SMTP account** credential with your provider's host, user and password (Gmail and Outlook need an app password).
2. Set the port and toggle together: `465` with **SSL/TLS** on, or `587` with **SSL/TLS** off so the connection upgrades with STARTTLS ([n8n SMTP credential docs](https://docs.n8n.io/integrations/builtin/credentials/send-email)).
3. Fill **From Email**, **To Email** and **Subject**, then pick **Email Format**: Text, HTML or Both.
4. Under **Options**, turn **Append n8n Attribution** off, or every message ends with "This email was sent automatically with n8n".
5. Add attachments by naming the binary property, for example `data`, from a previous node.

Use the **Send and Wait for Response** operation when a person has to approve something before the workflow continues; it pauses the execution until they click a button or submit a form. That is the one thing this node does that an API call does not do by itself.

### Why does the n8n Send Email node fail or time out?

A Send Email node that hangs until it times out is almost always a connection problem, not a message problem. Check these in order:

- **Port and SSL/TLS do not match.** Port 465 with SSL/TLS off, or 587 with it on, makes the handshake stall. Match them as in step 2 above. Our [SMTP port guide](https://sendhq.cc/blog/smtp-port-587-vs-465-vs-25) explains the difference.
- **Your host blocks SMTP.** DigitalOcean blocks ports 25, 465 and 587 on all Droplets by default, including traffic through a Reserved IP ([DigitalOcean](https://docs.digitalocean.com/support/why-is-smtp-blocked/)). Other clouds limit port 25. A self-hosted n8n there cannot use SMTP at all; HTTPS on 443 is not affected.
- **n8n Cloud.** n8n does not document an SMTP block on Cloud, and an n8n team member said in a June 2026 [community thread](https://community.n8n.io/t/301147) that Cloud should not block outbound SMTP, pointing at the mail service or the SSL/TLS settings instead. If it still hangs, your provider may be refusing n8n Cloud's changing IP addresses. Switching to an HTTPS API removes the question.
- **Authentication refused.** Gmail and Outlook reject a normal password over SMTP; use an app password.

## Which API errors can the HTTP Request node return?

Errors on the HTTP Request route are explicit, each with a status and a code:

| Status and code | Meaning | What to do in n8n |
| --- | --- | --- |
| `401` | Missing or wrong API key | Fix the Header Auth credential; do not retry |
| `402 subscription_required` | No active plan | Choose a plan, then rerun |
| `403` | From domain not verified, or policy block | Verify the domain or fix `from` |
| `409` | Same Idempotency-Key with a different body | Use a new key for a new email |
| `422` | Validation error or suppressed recipient | Fix the data; do not retry |
| `429 daily_limit_reached` | Daily sending ladder reached | Wait until midnight UTC (`Retry-After`) |
| `502` / `503` | Transient | Retry on Fail with the same key |

Source: [SendHQ errors and retries](https://sendhq.cc/docs/errors.md). For bulk sends, the HTTP Request node's **Batching** option (Items per Batch, Batch Interval) spaces requests out; see our [email API rate limits reference](https://sendhq.cc/blog/email-api-rate-limits).

## How do I check the email was delivered?

An accepted request is not a delivered email. The `201` means SendHQ stored and queued it; the recipient's server decides later. You have two ways to find out in n8n.

**Option A: poll once.** Add a **Wait** node (for example 2 minutes), then a second HTTP Request node:

```
Method:          GET
URL:             https://sendhq.cc/api/v1/emails/{{ $json.id }}/events
Authentication:  Header Auth (same credential)
```

The response is `{"data": [...], "count": n}` with the delivery, bounce, complaint, open and click events. `GET /emails/{{ $json.id }}/delivery` returns the timeline with bounce and complaint reasons and a single `status` you can branch on with an **If** node.

**Option B: receive webhooks.** Add a **Webhook** node in a separate workflow, copy its production URL, and register it with SendHQ:

```
curl https://sendhq.cc/api/v1/webhooks \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-n8n.example.com/webhook/sendhq","events":["email.delivered","email.bounced","email.complained"]}'
```

Each event arrives as JSON with `type`, `created_at` and `data.email_id`, the same ID you stored on send. A bounce includes `data.bounce.type` (`Permanent` or `Transient`) and the receiving server's diagnostic, such as `550 5.1.1 user unknown`. SendHQ signs deliveries with the Standard Webhooks scheme and retries a failed delivery up to 8 times over about 27 hours ([webhooks docs](https://sendhq.cc/docs/webhooks.md)). Verify the `webhook-signature` header in a Code node before trusting the payload; our [webhook reliability patterns](https://sendhq.cc/blog/email-webhook-reliability-patterns) cover the rest.

![A bounce webhook carries the email id from the original send, so n8n can match it to the record](https://cdn.sanity.io/images/l4lj7ros/production/b093631049f795e6b2e05b04ac8f6d743b9593b2-1344x410.png?w=1280&auto=format)

Store the id on send; look it up when the event arrives.

## How do I reply in the same thread from n8n?

Pass the SendHQ ID of the email you are answering as `reply_to_email_id`. SendHQ sets `In-Reply-To`, `References` and a new `Message-ID`, so Gmail and Outlook show the reply in the same conversation:

```
{
  "from": "Support <support@mail.acme.com>",
  "to": ["{{ $json.customerEmail }}"],
  "subject": "Re: {{ $json.subject }}",
  "text": "{{ $json.replyText }}",
  "reply_to_email_id": "{{ $json.originalEmailId }}"
}
```

This is the case the n8n docs list as a limitation of the Send Email node. It matters for AI agent workflows in n8n that answer inbound email; see [email API for AI agents](https://sendhq.cc/guides/email-api-for-ai-agents.md) for the receive side.

## FAQ

### How do I send email in n8n?

Add a Send Email node with an SMTP credential, or an HTTP Request node that POSTs JSON to an email API such as `https://sendhq.cc/api/v1/emails` with a Bearer API key. Map From, To, Subject and the body from earlier nodes with expressions.

### Should I use SMTP or an email API in n8n?

Use SMTP for internal notifications from a mailbox you already have. Use an API for customer email: it works over HTTPS where SMTP ports are blocked, supports idempotent retries, threads replies and reports delivery and bounces.

### Why does the n8n Send Email node fail on Cloud?

Usually a port and SSL/TLS mismatch (465 needs SSL/TLS on, 587 needs it off) or the mail provider refusing the login or the sending IP. n8n does not document an SMTP block on Cloud. Sending through an HTTPS API avoids SMTP entirely.

### How do I check the email was delivered?

Keep the `id` from the send response, then call `GET /api/v1/emails/:id/events` after a Wait node, or register an n8n Webhook node for `email.delivered` and `email.bounced` events. A `201` on send means accepted, not delivered.

### Can I send attachments with the HTTP Request node?

Yes. SendHQ accepts attachments on a send; see the [sending docs](https://sendhq.cc/docs/sending.md) for the attachment fields and size limit. In the Send Email node, name the binary property instead.

### Does n8n retry cause duplicate emails?

With SMTP it can: a retry after a timeout may send a second copy. With SendHQ, the same `Idempotency-Key` and body return the first result, so **Retry on Fail** is safe.

## Start sending from n8n

Create a workspace, verify your domain and paste the HTTP Request settings above into your workflow. Your first email returns an ID you can track to delivery.

[Start sending with SendHQ](https://sendhq.cc/pricing.md)

## Related articles

[How to Send Transactional Email in Node.js with an Email API](https://sendhq.cc/blog/send-transactional-email-nodejs-api) [How to Secure Inbound Email Webhooks in Node.js](https://sendhq.cc/blog/secure-inbound-email-webhooks-nodejs) [Send Email from a Supabase Edge Function (HTTP API Guide)](https://sendhq.cc/blog/send-email-from-supabase-edge-function) [SMTP Port 587 vs 465 vs 25: Which Should Your App Use?](https://sendhq.cc/blog/smtp-port-587-vs-465-vs-25) [How to Give an AI Agent Safe Email Sending Access](https://sendhq.cc/blog/safe-email-access-for-ai-agents) [IMAP vs SMTP: What's the Difference, and Which Does Your App Need?](https://sendhq.cc/blog/imap-vs-smtp)
