The SMTP block sends email through a mail server using its hostname, port, security protocol, and credentials. Set the sender, recipients, subject, and plain-text or HTML body; add CC, BCC, reply-to, and attachments as needed. Inspect the returned send status and message ID, or the error if sending fails.
Use the block
Send email through an SMTP server using its host, port, security protocol, and credentials. Configure recipients, message content, and optional attachments.
Actions
SMTP Send Mail
Send emails via SMTP server
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
smtpHost | string | Yes | SMTP server hostname (e.g., smtp.gmail.com) |
smtpPort | number | Yes | SMTP server port (587 for TLS, 465 for SSL) |
smtpUsername | string | Yes | SMTP authentication username |
smtpPassword | string | Yes | SMTP authentication password |
smtpSecure | string | Yes | Security protocol (TLS, SSL, or None) |
from | string | Yes | Sender email address |
to | string | Yes | Recipient email address |
subject | string | Yes | Email subject |
body | string | Yes | Email body content |
contentType | string | No | Content type (text or html) |
fromName | string | No | Display name for sender |
cc | string | No | CC recipients (comma-separated) |
bcc | string | No | BCC recipients (comma-separated) |
replyTo | string | No | Reply-to email address |
attachments | file[] | No | Files to attach to the email |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the email was sent successfully |
messageId | string | Message ID from SMTP server |
to | string | Recipient email address |
subject | string | Email subject |
error | string | Error message if sending failed |