30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Validate Contact Form Mail Tags

This is the check for Contact Form 7’s quietest failure mode. Rename or remove a field and the notification keeps arriving, on time, looking normal — with a blank line where the value used to be.

Nothing in the WordPress admin flags it. The form still validates, the visitor still sees a success message, and the only symptom is a message you cannot reply to.

At a glance

Abilitycontact-form-7/validate-mail-tags
ToolsetContact Form 7 — toolset/contact-form-7
GroupContact Form 7 › Mail & Notifications
RequiresContact Form 7, active on the site
Capabilitymanage_options, plus read_contact_forms
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Every tag in both mail templates is checked against the fields the form actually has, and the ones resolving to nothing are returned as issues.

By default it checks both templates. Narrow to mail or mail_2 when you have only touched one.

Run it after any change to a form’s fields — a rename, a removal, a template rewrite. It is the difference between “the form saved” and “the form still tells you who wrote in”.

Input

NameTypeRequiredWhat it is
form_idintegerYesForm post ID, as returned by contact-form-7/list-forms.
whichstringNo — defaults to bothWhich template to check: mail, mail_2 or both.

What comes back

NameTypeWhat it is
form_idintegerThe form that was checked.
validbooleanTrue when every tag resolves.
issuesarrayOne entry per tag that resolves to nothing.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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:

I just renamed a field on form 42 — is the notification still complete?

It resolves to one call:

{
  "ability": "contact-form-7/validate-mail-tags",
  "parameters": {
    "form_id": 42,
    "which": "both"
  }
}

Worth knowing

  • Read-only. Run it freely, and run it after every field change.
  • This is not the same check as contact-form-7/validate-form-config. That one runs Contact Form 7’s own validator against structure; this one checks the tags against reality.
  • Fix what it reports with contact-form-7/update-mail.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading