n8n can send through Postwing two ways. The Send Email node speaks SMTP and needs nothing but a credential. The HTTP Request node calls the REST API instead, which adds saved templates, safe retries and a message id to track. Both authenticate with the same domain token.
| Setting | Value |
|---|---|
| SMTP host | smtp.postwing.app |
| Port | 587 |
| Encryption | STARTTLS (the connection is upgraded to TLS before login) |
| Username | The login of an SMTP token for your domain |
| Password | The password of that token — shown once, when the token is created |
Add a Send Email node, open Credential to connect with and create a new SMTP credential:
| Field | Value |
|---|---|
| User | The login of an SMTP token for your domain |
| Password | That token's password |
| Host | smtp.postwing.app |
| Port | 587 |
| SSL/TLS | Off |
| Disable STARTTLS | Off |
| Client Host Name | Leave empty |
465. On port 587 leave it off: n8n upgrades the connection with STARTTLS by itself, and that upgrade is what protects the password. Turning on Disable STARTTLS as well would send the token's password across the network in clear text. | Parameter | Value |
|---|---|
| Operation | Send |
| From Email | Acme <noreply@your-domain.com> — on your verified domain |
| To Email | An expression such as {{ $json.email }}; several addresses are comma-separated |
| Subject | Text or an expression |
| Email Format | Both — an HTML part and a plain-text one |
| Options | Reply To for replies, and Append n8n Attribution switched off |
The From address is what DKIM, SPF and DMARC are checked against. Put a customer's address there — say, from a form submission — and the message is refused; use Reply To for it instead.
Put your own address in To Email and execute the node on its own. A failure shows the SMTP server's reply in the node's output, which tells you whether the port, the encryption or the credentials are wrong.
Configure an HTTP Request node with Method POST, URLhttps://api.postwing.app/external/send_email_simple/, Authentication None, Send Body on, Body Content Type JSON and Specify Body Using JSON. Switch the JSON field to an expression and paste:
{
"to": [{{ JSON.stringify($json.email) }}],
"subject": {{ JSON.stringify($json.subject) }},
"body": {{ JSON.stringify($json.html) }},
"sender": "Acme <noreply@your-domain.com>",
"idempotency_key": {{ JSON.stringify("order-" + $json.orderId) }},
"auth": {
"username": "token-login@your-domain.com",
"password": "your-token-password"
}
}JSON.stringify quotes and escapes each value, so HTML full of quotes and line breaks cannot break the body. The token travels in the body because that is how the send API authenticates — n8n's credential store has no slot for it here, so anyone who can edit or export the workflow can read it. The idempotency_key makes a repeated request return the first result instead of sending again. The rest of the fields are in the API reference.
The node also has Import cURL. Pasting this fills in the method, URL, header and body in one go:
curl -X POST https://api.postwing.app/external/send_email_simple/ \
-H "Content-Type: application/json" \
-d '{"to": ["you@your-domain.com"], "subject": "Test", "body": "<p>It works.</p>",
"sender": "Acme <noreply@your-domain.com>",
"auth": {"username": "token-login@your-domain.com", "password": "your-token-password"}}'| Error | Cause and fix |
|---|---|
Timeout or Greeting never received | SSL/TLS is off with port 465, or the port is blocked on a self-hosted instance — use 8587 or 8465. |
wrong version number | SSL/TLS is on with port 587. Turn it off. |
535 authentication failed | Wrong token login or password. |
550 from must be equal to … | From Email is not on your verified domain. |
HTTP 400 Invalid username or password | Wrong token in the HTTP Request body's auth. |
HTTP 400 JSON parse error | A value was inserted without JSON.stringify, or the field is not in expression mode. |
| Mail goes to spam | A new domain with no sending history yet — see domain reputation. |
Off for port 587: the connection starts in plain text and is upgraded with STARTTLS, which n8n does on its own unless Disable STARTTLS is on. On for port 465, where TLS starts with the first byte. Getting this backwards is the usual cause of a handshake error or a timeout.
The User or Password in the credential is wrong. The user is the login of an SMTP token for your domain, not your account email, and the password is that token's password — shown once, when the token is created.
Yes. The Send Email node accepts Name <address> in From Email. The address must be on the domain you verified, or the message is refused.
The Send Email node is simpler and keeps the token encrypted in n8n's credential store. The HTTP Request node gets you saved templates, an idempotency key that makes retries safe, and a structured response with the message id every delivery webhook reports.
In the Send Email node, add the Append n8n Attribution option and switch it off.
In the node's Settings, turn on Retry On Fail and set Max Tries and Wait Between Tries. With the HTTP Request node, send an idempotency_key so a retry after a timeout never delivers the message twice.