Mail Node
Send email over SMTP, or read email over IMAP, using your own mail server.
Overview
The Mail node connects to any mail server you have an account on. In Send Email (SMTP) mode it sends a message with optional Cc, Bcc and attachments. In Fetch Emails (IMAP) mode it reads messages from a mailbox so the workflow can act on them. Store the password in the Vault and reference it as {{secrets.KEY}}.
Send Email (SMTP)
| Field | Description | Default |
|---|---|---|
SMTP Host |
Hostname of your SMTP server, for example smtp.example.com |
- |
SMTP Port |
587 (STARTTLS), 465 (SSL) or 25 (plain) | 587 |
Security |
STARTTLS, SSL / TLS or None |
STARTTLS |
SMTP Username / SMTP Password |
Your mail account login | - |
From Name / From Email |
The sender shown to recipients. From Email defaults to the SMTP username | - |
To |
Comma-separated recipient addresses. Use + Add Cc / Bcc for copies | - |
Subject |
Supports {{variables}} |
- |
Body Type |
HTML or Plain Text |
HTML |
Body |
Message content. Supports {{variables}} |
- |
Attachments |
One per line: a {{variable}} that holds a file (such as an HTML to PDF or Image output), a gs:// path, a public URL or a storage path |
- |
Fetch Emails (IMAP)
| Field | Description | Default |
|---|---|---|
IMAP Host |
Hostname of your IMAP server | - |
IMAP Port |
993 (SSL) or 143 (STARTTLS or plain) | 993 |
Security |
SSL / TLS, STARTTLS or None |
SSL / TLS |
IMAP Username / IMAP Password |
Your mail account login | - |
Mailbox / Folder |
The folder to read, for example INBOX |
INBOX |
Search Filter |
Unread, All, Recent or Flagged |
Unread |
Max Messages |
How many messages to fetch per run | 10 |
Mark fetched messages as read |
Mark them read after fetching | Off |
Include attachments |
Fetch attachments too | Off |
Both modes share On Error (Stop Flow, Continue (empty output), Continue (default value)) and Output Variable (default mail).
Example: Answer new support emails
Flow Start (Schedule, every 15 minutes) → Mail (Fetch, Unread, mark as read) → For Loop → Model (draft reply) → Mail (Send)
Best Practices
- Keep passwords in the Vault, never typed into the node.
- Turn on Mark fetched messages as read in polling workflows, or the same messages are fetched on every run.
- Many providers need an app password instead of your normal password for SMTP and IMAP.