contact-form-7/update-mail merges. Fields you omit keep their current values, which is the difference between this and passing a mail object to contact-form-7/update-form — that one replaces the whole template.
So changing a subject line is one field, and the recipient, sender, body and headers stay exactly as they were.
At a glance
| Ability | contact-form-7/update-mail |
| Toolset | Contact Form 7 — toolset/contact-form-7 |
| Group | Contact Form 7 › Mail & Notifications |
| Requires | Contact Form 7, active on the site |
| Capability | manage_options, plus edit_contact_forms |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
The gate on this one
Changing recipient requires confirm: true. That one field decides where every submission on this form is delivered, and getting it wrong fails in the worst possible way: mail goes nowhere, nothing is logged, and the visitor still sees the success message. Every other field on this ability writes without a gate.
How it works
Run contact-form-7/list-mail-tags before writing a body. It returns the tags this form actually provides — one per named field, plus Contact Form 7’s built-in context tags — so the body does not reference something that does not exist.
A tag that matches nothing is not an error. It renders as empty, which is why the response returns unresolved_tags explicitly: it is the only place that breakage surfaces.
Some fields are sanitised before they are stored — headers in particular. The response lists which under sanitised, so you can read the stored mail back and see what survived rather than assuming your input went in verbatim.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
form_id | integer | Yes | Form post ID, as returned by contact-form-7/list-forms. |
which | string | No — defaults to mail | mail is the notification sent to the site; mail_2 is the optional autoresponder sent to the visitor. |
subject | string | No | Mail subject. May contain mail tags. |
sender | string | No | From address. |
recipient | string | No | Where submissions are delivered. Changing this requires confirm: true. |
body | string | No | Mail body. May contain mail tags. |
additional_headers | string | No | Extra headers, e.g. Reply-To: [your-email]. |
use_html | boolean | No | Send as HTML rather than plain text. |
exclude_blank | boolean | No | Drop lines whose tags resolve to nothing. |
confirm | boolean | Only when changing the recipient | Required when recipient is being changed. Ignored otherwise. |
What comes back
| Name | Type | What it is |
|---|---|---|
form_id | integer | The form that was written. |
which | string | Which template was written. |
mail | object | The mail template after the merge. |
updated | array | Which fields actually changed. |
unresolved_tags | array | Tags in the new content that match no field on this form. |
sanitised | array | Fields whose content was altered by sanitising before storage. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
On form 42, add the phone number to the notification body and set a Reply-To header.
It resolves to one call:
{
"ability": "contact-form-7/update-mail",
"parameters": {
"form_id": 42,
"which": "mail",
"body": "From: [your-name] <[your-email]>\nPhone: [your-phone]\n\n[your-message]",
"additional_headers": "Reply-To: [your-email]"
}
}Worth knowing
- Idempotent — sending the same fields twice leaves the same template.
- Check
unresolved_tagson every response. A tag matching nothing renders as empty rather than failing. - Check
sanitisedtoo, then read the stored mail back to see what was kept. - For the autoresponder, pass
which: "mail_2"— and switch it on separately withcontact-form-7/toggle-mail-2.
Related abilities
- List Contact Form Mail Tags — what the body may reference
- Get Contact Form Mail Template — read the current template first
- Validate Contact Form Mail Tags — check both templates afterwards
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category