---
title: SMTP
description: Send emails via any SMTP mail server
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard 
  type="smtp"
  color="#2D3748"
/>

## Usage Instructions

Send emails using any SMTP server (Gmail, Outlook, custom servers, etc.). Configure SMTP connection settings and send emails with full control over content, recipients, and 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 |


