send_email
Send email messages through Proton Mail SMTP with support for HTML (sanitized by default), plain text, markdown, attachments, CC/BCC, and dry-run preview.
Instructions
Send an email using Proton Mail SMTP. HTML bodies are sanitized through a conservative allowlist by default (v1.0.0: sanitizeHtml defaults to true) — scripts, event handlers, inline styles, and remote <img> beacons are stripped. Pass sanitizeHtml: false to send full-fidelity HTML in trusted-content workflows. Plain-text bodies pass through unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient email address(es). Multiple addresses can be separated by commas. | |
| subject | Yes | Email subject line | |
| body | No | Email body content (plain text or HTML). Required unless `markdownBody` is provided. | |
| isHtml | No | Whether `body` contains HTML content | |
| markdownBody | No | Markdown source — rendered to HTML before sending. Mutually exclusive with `body`/`isHtml`. The email-service computes a plain-text fallback automatically for multipart/alternative. | |
| sanitizeHtml | No | When the body is HTML (either via `isHtml: true` or `markdownBody`), strip scripts, event handlers, inline styles, disallowed tags, and remote `<img>` beacons through a conservative allowlist. **Defaults to true as of v1.0.0** for safer-by-default agent-driven sending. Pass `false` to preserve full-fidelity HTML for trusted-content workflows. No-op on plain-text bodies. | |
| cc | No | CC recipient(s), separated by commas | |
| bcc | No | BCC recipient(s), separated by commas | |
| replyTo | No | Reply-To email address. Note: Proton SMTP may rewrite or ignore values that don't match authenticated identities. | |
| fromName | No | Display name for the From field. By default rejects values containing `@` to prevent display-name-as-address spoofing (e.g. `"Anthropic Security <security@anthropic.com>"` looks like a legitimate sender in most mail clients even though the envelope From is bound to the authenticated identity). Pass `allowAddressLikeFromName: true` for legitimate cases. | |
| allowAddressLikeFromName | No | Opt-in escape valve for `fromName` containing `@`. Default false — see fromName's note for why this is the safer-by-default posture for agent-driven sending. | |
| attachments | No | File attachments (base64-encoded content) | |
| dryRun | No | If true, validate and resolve the full recipient set (To/CC/BCC) + subject + body WITHOUT sending — returns a preview so you can confirm exactly who would receive the mail. Mirrors the bulk/thread dry-run pattern. |