Overview
This node sends emails using the SMTP protocol with support for email threading features such as "In-Reply-To" and "References" headers. It is useful in scenarios where automated email sending is required, including notifications, alerts, or follow-up emails that maintain conversation context.
Practical examples:
- Sending a notification email to users after a form submission.
- Sending marketing emails with attachments.
- Replying to an existing email thread programmatically by setting appropriate headers.
Properties
| Name | Meaning |
|---|---|
| From Email | Email address of the sender. |
| To Email | Email address(es) of the recipient(s). Multiple addresses can be separated by commas. |
| Subject | Subject line of the email. |
| Text | Plain text content of the email message. |
| HTML | HTML content of the email message. |
| Additional Fields | Collection of optional fields: - Attachments: Array of files with name, base64 content, and MIME type. - BCC Email: Blind copy recipient(s), comma-separated. - CC Email: Copy recipient(s), comma-separated. - In-Reply-To: Message ID this email replies to (for threading). - Priority: Email priority; options are Low, Normal, High. - References: Message IDs in the conversation thread, space or comma separated. - Reply To: Email address for replies. |
Output
The node outputs JSON data containing details about the sent email:
messageId: The unique identifier of the sent email message.accepted: List of recipient addresses accepted by the SMTP server.rejected: List of recipient addresses rejected by the SMTP server.response: Raw response from the SMTP server.
Each output item corresponds to one input item processed.
Dependencies
- Requires an SMTP server credential configured in n8n to send emails.
- Uses an internal utility function to create the SMTP transporter based on provided credentials.
- No external API dependencies beyond the SMTP service.
Troubleshooting
Common issues:
- Invalid SMTP credentials or connection failure will cause errors.
- Incorrectly formatted email addresses may lead to rejection by the SMTP server.
- Missing required fields like "From Email" or "To Email" will prevent sending.
- Large or improperly encoded attachments might cause failures.
Error messages:
- Errors from the SMTP server (e.g., authentication failed, connection refused) will be thrown and can be seen in the node's error output.
- If "continue on fail" is enabled, errors for individual items will be returned in the output JSON under an
errorfield.
Resolution tips:
- Verify SMTP credentials and server accessibility.
- Ensure all email addresses are valid and properly formatted.
- Check attachment encoding and size limits.
- Use the "Additional Fields" to set proper threading headers if replying to emails.