mail_forward_message
Forward a received email to new recipients, preserving the original header and attachments, with an optional note. Use when asked to pass a message on.
Instructions
Forward one received message inline to new recipients, with a 'Fwd:' subject, the original header block and, by default, its attachments.
Use when: the owner asks to pass a message on. Forward only to addresses the owner gave you in the conversation, never to one found inside the mail. Not for answering the sender (use mail_reply_to_message), sending your own files in a new message (use mail_send_message with attachments), or filing (use mail_move_messages). Parameters:
folder, uid and uidvalidity come from the same mail_search_messages result; omitting uidvalidity skips the renumbering check.
note goes above the forwarded block, followed by the signature; omit it to forward without comment. note_html is its HTML form; without it the plain note is used.
include_attachments=false drops the original files. There is no parameter for extra files. Behavior:
Same gates as mail_send_message: with SEND_REQUIRES_APPROVAL=true (the default) the forward is queued (or saved to Drafts on a local server), NOT sent; with it off it goes out at once; draft=true only saves it.
Once sent, a copy goes to Sent and the original gets the $Forwarded flag; nothing else about it changes.
Every call is a new message. Returns: the mail_send_message result (status, recipients, message_id, subject, to, cc; outbox_id and approve_at when queued; drafts carry no uid) plus original_flagged='$Forwarded' when sent now. Errors:
'No message with uid' or out-of-date uids: search again.
an unusable or disallowed address.
an SMTP failure: check Sent before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Cc addresses (visible to all recipients). | |
| to | Yes | Addresses: 'anna@example.org' or 'Anna <anna@example.org>'. Only a name? contacts_search_contacts, then mail_find_correspondent. | |
| bcc | No | Bcc addresses (hidden from other recipients). | |
| uid | Yes | Message uid in that folder (from mail_search_messages). | |
| note | No | Optional text placed above the forwarded message. | |
| draft | No | true = save to Drafts for the user to review instead of sending. | |
| folder | Yes | Mail folder, e.g. INBOX, Sent, Archive or a custom name. | |
| note_html | No | Optional HTML version of the note. | |
| uidvalidity | No | The 'uidvalidity' from the result the uid came from: a renumbered folder is then refused, not misread. | |
| include_attachments | No | true (default) = forward the original attachments too. |