# SMTP (/integrations/smtp)



{/* MANUAL-CONTENT-START:intro */}

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.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Send email through an SMTP server using its host, port, security protocol, and credentials. Configure recipients, message content, and optional attachments.

## Actions [#actions]

### SMTP Send Mail [#smtp-send-mail]

Send emails via SMTP server

#### Input [#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 [#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 |
