
Step by Step Guide to solve n8n SMTP Node Send Failure Error
Who this is for:
Automation engineers and DevOps professionals using n8n to send transactional email via an SMTP server. We cover this in detail in the n8n Node Specific Errors Guide.
Quick Diagnosis
Problem: The SMTP node reports success but no email arrives.
Quick fix:
| Step | Action | Result |
|---|---|---|
| 1 | Open the node → Credentials → verify SMTP host, port, TLS/SSL settings. | Correct connection details. |
| 2 | In Additional Fields enable Raw Output and run the workflow. | View the server’s response in the execution log. |
| 3 | If the response is 250 OK but the mail never arrives, check spam/junk and DMARC/SPF alignment for the sender domain. |
Confirms delivery vs. rejection. |
| 4 | Add a Set node before the SMTP node to output the full email headers and compare them with a known‑working message. | Detect missing/invalid headers (From, To). |
| 5 | If the server returns 550 5.1.1 or similar, correct the recipient address or whitelist the sending IP. |
Resolves address‑rejection errors. |
Run the workflow again – the email should now be delivered.
1. Why the SMTP node can appear “successful” while the mail never lands
If you encounter any n8n excel node file corruption resolve them before continuing with the setup.
Even with a Success status, n8n only confirms that the SMTP transaction completed. Delivery depends on several layers:
- Server response codes – n8n logs only the final code (e.g.,
250 OK). - Recipient validation – some providers accept the message then bounce later.
- Spam‑filtering – DMARC, SPF, DKIM mis‑configurations cause silent drops.
- Network‑level blocks – outbound port 25 may be blocked by the host provider.
Understanding these layers prevents endless “node ran fine but no mail” loops.
2. Step‑by‑Step Diagnostic Workflow
If you encounter any n8n mysql node connection timeout resolve them before continuing with the setup.
2.1 Capture the raw SMTP conversation
- Open the SMTP node → Additional Fields → toggle Raw Output.
- Execute the workflow with a test payload.
- In the Execution Log, expand Raw Output.
Sample transcript – part 1 (handshake & envelope):
EHLO my.n8n.instance 250-mail.example.com 250-PIPELINING 250-8BITMIME 250-STARTTLS 250-AUTH PLAIN LOGIN 250 OK MAIL FROM:<n8n@mydomain.com> 250 2.1.0 Ok
Sample transcript – part 2 (recipient & data):
RCPT TO:<invalid@example.org> 550 5.1.1 <invalid@example.org>: Recipient address rejected DATA 354 End data with <CR><LF>.<CR><LF> ...
EEFA note: If you see 250 OK after DATA but the email never arrives, the server may have accepted the message for asynchronous processing and later generated a bounce. Check the server’s mail queue or bounce mailbox.
2.2 Verify credentials & connection security
| Setting | Typical Values | Common Pitfalls |
|---|---|---|
| Host | smtp.gmail.com, mail.mycompany.com | Typos, missing sub‑domain (mail.) |
| Port | 465 (SSL) or 587 (STARTTLS) | Using 25 on cloud providers that block it |
| TLS/SSL | SSL for 465, STARTTLS for 587 | Mixing SSL with STARTTLS causes handshake failures |
| Auth Type | Login, Plain, OAuth2 | Using OAuth2 with a password‑only account |
EEFA warning: Providers such as Google Workspace require App Passwords or OAuth2 scopes. Supplying a regular password yields 535 5.7.8 Authentication credentials invalid – the node may still report *success* if the error is swallowed by a try‑catch block.
2.3 Inspect email headers generated by n8n
Add a Set node before the SMTP node to expose the headers:
| Field | Value |
|---|---|
| emailHeaders | {{ $json[“headers”] || {} }} |
| rawMessage | {{ $json[“raw”] }} |
Run the workflow and review the output. Typical missing‑header issues:
- Missing
From→550 5.6.0 Missing From header. - Invalid
Toformat → e.g., “john.doe” instead of “john.doe@example.com”. - Wrong
Content-Type→ message treated as plain text when HTML is expected.
2.4 Check server‑side queues & bounce handling
If the raw output ends with 250 OK but the recipient reports non‑delivery:
- SSH into the SMTP server (or ask your admin) and run the appropriate queue command.
- Postfix:
postqueue -p
- Exim:
exim -bp
- Locate the message ID from the n8n log.
- If it’s in a deferred state, note the reason (e.g., DNS lookup failure, greylisting).
EEFA tip: Cloud‑hosted services (Mailgun, SendGrid) expose an **API dashboard** where you can search the message ID and view bounce details.
3. Common Failure Scenarios & Exact Fixes
| Error | Root Cause | Fix |
|---|---|---|
| 550 5.1.1 – Recipient address rejected | Invalid or non‑existent mailbox | Verify the To address; add an Email Validation node before SMTP. |
| 421 4.4.2 – Connection timed out | Outbound port blocked by firewall or provider | Open port 25/587/465 in the server’s security group; request removal of SMTP throttling on cloud platforms. |
| 535 5.7.8 – Authentication failed | Wrong credentials or missing App Password | Regenerate credentials; for Gmail enable 2‑Step Verification and create an App Password. |
| 452 4.3.1 – Insufficient system storage | Mail queue full on the SMTP server | Clean old messages or increase disk quota. |
| No error, but email lands in spam | DMARC/SPF/DKIM mis‑alignment | Add an SPF record (v=spf1 include:mail.mycompany.com -all), configure DKIM signing, ensure From domain matches the signing domain. |
| 250 OK but no delivery after 24 h | Remote server silently discarding (blacklist) | Check if the sending IP appears on an RBL (e.g., Spamhaus); request delisting or switch to a reputable SMTP relay. |
4. Production‑Ready Checklist
If you encounter any n8n wait node timeout resolve them before continuing.
| Steps | Item |
|---|---|
| ✔ | Credentials – Verify host, port, TLS/SSL, username, password (or OAuth token). |
| ✔ | Raw Output – Enable in node → confirm server response codes. |
| ✔ | Headers – Ensure From, To, Subject, Content-Type are present and correctly formatted. |
| ✔ | Recipient Validation – Use an Email Validation node or regex before sending. |
| ✔ | Spam Checks – Confirm SPF/DKIM/DMARC for the sender domain. |
| ✔ | Network – Outbound SMTP ports open on the n8n host; no provider throttling. |
| ✔ | Queue Monitoring – Periodically inspect the SMTP server’s queue for deferred messages. |
| ✔ | Logging – Store the raw SMTP transcript in a Log node for audit trails. |
| ✔ | Error Handling – Wrap the SMTP node in a Try/Catch workflow; on error, send a Slack alert with the raw output. |
5. Example: Minimal n8n workflow that guarantees visibility
5.1 SMTP node (raw output enabled)
{
"name": "SMTP Send",
"type": "n8n-nodes-base.smtp",
"typeVersion": 1,
"position": [400, 300],
"parameters": {
"email": "test@example.com",
"subject": "n8n SMTP test",
"text": "Hello from n8n!",
"options": { "rawOutput": true }
},
"credentials": { "smtp": "MySMTP" }
}
5.2 Capture Raw node (stores transcript)
{
"name": "Capture Raw",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [600, 300],
"parameters": {
"functionCode": "return [{ json: { raw: $node[\"SMTP Send\"].json.rawOutput } }];"
}
}
5.3 Slack alert node (fires only on error)
{
"name": "Slack Alert",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [800, 300],
"parameters": {
"text": "SMTP node failed – see logs",
"channel": "#alerts"
},
"conditions": { "error": true }
}
Workflow connections: SMTP Send → Capture Raw → Slack Alert (error‑only path).
The Capture Raw node records the full SMTP transcript, while the Slack Alert node notifies only on failure, keeping production noise low.
Conclusion
n8n’s SMTP node reports success when the SMTP transaction completes, not when the message reaches the inbox. By enabling Raw Output, validating credentials, inspecting headers, and monitoring the mail queue, you can pinpoint why an email disappears after a “successful” run. Apply the production checklist, capture the full transcript, and implement error‑aware alerts to keep automated communications reliable in real‑world deployments.



