imap_send_email
Compose and send a new email via SMTP, supporting CC, BCC, HTML, plain text, and attachments, with a copy saved to Sent.
Instructions
Compose and send a NEW email via the account's SMTP server (a copy is saved to Sent unless disabled; account defaultBcc addresses are always BCC'd when configured). Use for fresh outbound messages. To respond to an existing message use imap_reply_to_email (keeps threading); to pass a message on use imap_forward_email; to store without sending use imap_save_draft. Supports to/cc/bcc, text and/or HTML, and attachments by base64 content or by file path (see imap_upload_file for large files).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC recipients. Either an array of addresses or a single comma-separated string. | |
| to | Yes | Recipient email address(es). Either an array of addresses or a single comma-separated string; both accept "Name <addr@example.com>" form. | |
| bcc | No | BCC recipients. Either an array of addresses or a single comma-separated string; merged with the account defaultBcc when set. | |
| body | No | Alias for 'text' (backward-compat with clients that pass 'body') | |
| html | No | HTML content | |
| text | No | Plain text content | |
| replyTo | No | Reply-to address | |
| subject | Yes | Email subject | |
| accountId | No | Account ID (from imap_list_accounts). Optional if accountName is given or only one account is configured. | |
| accountName | No | Account name instead of accountId. Optional if accountId is given or only one account is configured. | |
| attachments | No | Email attachments |