> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condotta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SMTP Email

> Send emails via any SMTP server (Gmail, Outlook, self-hosted, etc.).

The SMTP Email connector lets your workflows send emails through any SMTP-compatible mail server. Works with Gmail, Microsoft 365, Amazon SES, SendGrid, Mailgun, and any self-hosted SMTP server.

> [!TIP]
>
> If you just need to send a quick notification email without setting up an external service, use the built-in [Send Email node](https://docs.condotta.ai/workflow-editor/nodes/send-email.md) instead; it sends from Condotta with no connection required.

> [!NOTE]
>
> This connector requires a **connection** with valid credentials before it can be used in a workflow. See [Managing Connections](https://docs.condotta.ai/platform/connections.md) for setup instructions.

## Connection setup

**1. Gather your SMTP credentials**

You'll need the following from your email provider:

* **SMTP Host** (e.g., `smtp.gmail.com`)
* **Port** (typically `587` for STARTTLS or `465` for SSL)
* **Username** (usually your email address)
* **Password** (your email password or app-specific password)

**2. Add the connection in Condotta**

Go to **Connections** in Condotta, click **Add Connection**, select **SMTP Email**, and enter:

* **SMTP Host**: Your mail server hostname
* **Port**: SMTP port number
* **Username**: Your SMTP username
* **Password**: Your SMTP password
* **Use SSL/TLS** (optional): Enable for port 465. Auto-detected if left off.
* **Default From Address** (optional): A default sender address (e.g., `Team <hello@yourdomain.com>`) used when `from` is not specified in the tool parameters

> [!TIP]
>
> **Gmail**: You must use an [App Password](https://support.google.com/accounts/answer/185833 "Google Account Help: App Password") instead of your regular password. Enable 2-Step Verification first, then generate an App Password.

> [!TIP]
>
> **Microsoft 365**: SMTP AUTH must be enabled for the mailbox. An admin can enable it in the Microsoft 365 admin center under **Active users → Mail → Manage email apps**.

### Common SMTP settings

| Provider | Host | Port | Notes |
| - | - | - | - |
| Gmail | `smtp.gmail.com` | 587 | Requires App Password |
| Outlook / Microsoft 365 | `smtp.office365.com` | 587 | Enable SMTP AUTH |
| Amazon SES | `email-smtp.us-east-1.amazonaws.com` | 587 | Use SMTP credentials (not AWS keys) |
| SendGrid | `smtp.sendgrid.net` | 587 | Username is `apikey`, password is your API key |
| Mailgun | `smtp.mailgun.org` | 587 | Use domain-specific SMTP credentials |

## Tools

> [accordion] send-email: Send an email
>
> **from** `string`
>
> Sender address (e.g., `Team <hello@yourdomain.com>`). Falls back to the connection's default from address.
>
> **to** `string | string[]` *required*
>
> Recipient email address(es).
>
> **subject** `string` *required*
>
> Email subject line.
>
> **html** `string`
>
> HTML email body.
>
> **text** `string`
>
> Plain text email body.
>
> **cc** `string | string[]`
>
> CC recipient(s).
>
> **bcc** `string | string[]`
>
> BCC recipient(s).
>
> **replyTo** `string`
>
> Reply-to address.
>
> **attachments** `object[]`
>
> File attachments. Each item is an object with a `filename` and base64-encoded `content`. The content type is inferred from the filename extension.
>
> In a workflow, map `content` to an upstream output that already produces base64-encoded bytes (e.g. a file downloaded over HTTP/FTP, or a document produced by another step).
>
> **Example request:**
>
> ```json theme={null}
> {
>   "from": "Orders <orders@mystore.com>",
>   "to": ["customer@example.com"],
>   "subject": "Your order has shipped!",
>   "html": "<h1>Order Shipped</h1><p>Your order #1234 has been shipped and is on its way.</p><p>Tracking: <a href='https://track.example.com/ABC123'>ABC123</a></p>",
>   "cc": ["warehouse@mystore.com"],
>   "replyTo": "support@mystore.com",
>   "attachments": [
>     { "filename": "invoice-1234.pdf", "content": "JVBERi0xLjQKJ..." }
>   ]
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "messageId": "<d2e8c1f3-4a5b-6c7d-8e9f-0a1b2c3d4e5f@mystore.com>",
>     "accepted": ["customer@example.com", "warehouse@mystore.com"],
>     "rejected": [],
>     "response": "250 2.0.0 OK"
>   }
> }
> ```

> [accordion] verify-connection: Test SMTP connection
>
> Verifies that the SMTP server is reachable and the credentials are valid without sending an email. No parameters required.
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "message": "SMTP connection verified successfully"
>   }
> }
> ```

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.