sch_send_mail
Send a new email via SMTP or save it as a draft by default, with optional CC/BCC, HTML body, and attachments.
Instructions
Send a new email via SMTP, or save as draft (default).
Args: to: Recipient(s), comma-separated (e.g. "a@x.gr,b@y.gr") subject: Subject line body: Email body (plain text by default; set html=True for HTML) cc: CC recipient(s), comma-separated bcc: BCC recipient(s), comma-separated html: True if body is HTML; False (default) for plain text attachments: List of absolute file paths to attach. Each must be an existing file inside the allowed folders (by default ~/Downloads and the temp dirs; SCH_MAIL_ALLOWED_DIRS replaces them). One that is missing or outside them fails the whole call, so nothing is saved or sent without it. send_now: True to dispatch via SMTP immediately. Default False = save to Drafts folder. account: Account key in credentials.json (e.g. "personal" or "work"). Default: the account named by "default" in that file.
Returns dict with status ("draft_saved" or "sent"), folder/recipients, and message id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| body | Yes | ||
| html | No | ||
| account | No | ||
| subject | Yes | ||
| send_now | No | ||
| attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||