Every Contact Form 7 form carries two mail templates. mail is the notification that goes to the site when someone submits. mail_2 is the autoresponder that goes back to the visitor, and it is inactive by default.
contact-form-7/get-mail returns either one in full: recipient, sender, subject, body, additional headers, attachments, and the flags that control HTML and blank-value handling.
At a glance
| Ability | contact-form-7/get-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 read_contact_forms |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
The body is where mail tags live — [your-name], [your-email] and so on. Each one has to match a field the form actually has, and nothing enforces that, so reading the body and the field list together is how you spot a break.
The exclude_blank flag decides whether an empty value leaves a blank line in the notification or is dropped entirely. It is the reason a missing value can be hard to notice.
Reading mail_2 on a form that has never used the autoresponder returns the template anyway, marked inactive. An empty inactive template is normal, not a fault.
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. |
What comes back
| Name | Type | What it is |
|---|---|---|
form_id | integer | The form the template belongs to. |
which | string | Which template was returned. |
mail | object | Recipient, sender, subject, body, headers, attachments and flags. |
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:
Where do submissions from form 42 actually go?
It resolves to one call:
{
"ability": "contact-form-7/get-mail",
"parameters": {
"form_id": 42,
"which": "mail"
}
}Worth knowing
- Read this before writing.
contact-form-7/update-mailmerges, but you still want to know what a body references before you change a field. - An inactive
mail_2is the default state, not a misconfiguration. - To check the body’s tags against the form’s real fields, use
contact-form-7/validate-mail-tags.
Related abilities
- Update Contact Form Mail Template — change it
- List Contact Form Mail Tags — what tags are available to the body
- Toggle Contact Form Autoresponder — switch mail_2 on or off
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category