Skip to main content
Cookbook Maintenance SureForms

Fix Form Emails That Never Arrive with SureForms and AI

The AI checks every form's email, finds the ones that are off or misaddressed, and fixes them with your yes.

Difficulty Beginner
Time ~10 min

Prerequisites

A site connected to WPVibe running SureForms 2.12.9 or newer (tested on the free 2.12.9) on WordPress 6.9 or newer, with an administrator account. SureForms' AI access must be on: SureForms > Settings > MCP > Enable Abilities (the tab first asks you to install the free MCP Adapter plugin). This recipe changes forms, so Enable Edit Abilities on the same tab must be on too.

The prompt
Emails from my SureForms forms are not arriving. Find out why before changing anything.

1. Run get_ability_info for each SureForms ability this uses: sureforms/list-forms, sureforms/update-form and sureforms/get-global-settings. If one is not found, SureForms is keeping it off: tell me to update SureForms if it is older than 2.12.9, then go to SureForms > Settings > MCP (install and activate the MCP Adapter plugin if the tab asks for it) and switch on Enable Abilities and Enable Edit Abilities (I can switch them off again afterwards), and stop. Curly-brace codes such as {admin_email}, {site_title}, {form_title}, {all_data} and {form:email} are SureForms smart tags: keep them as they are. {form:SLUG} is the answer to the field with that slug (get-form lists each field's slug).
2. List my forms with sureforms/list-forms, status publish, per_page 100 (if pages is more than 1, read the next pages too). For each form: To read a form's emails, run rest_api GET /wp/v2/sureforms_form/FORM_ID with context edit and _fields id,meta._srfm_email_notification: each item in the list is one email. status true means on, false means off; email_to, email_cc and email_bcc are where it goes; email_reply_to is where replies go. {admin_email} is the site admin email (run_wp_cli option get admin_email). An empty list means that form sends no email at all.
3. Run run_wp_cli plugin list --status=active and look for a mailer plugin (SureMail, WP Mail SMTP, FluentSMTP, Post SMTP or similar).
4. Tell me in plain words: a table of each published form with each email's name, on or off, where it goes, who gets copies and the From address (with the tags turned into real addresses), and anything wrong; if the From address is on a different domain from my site (for example a gmail.com address), say inboxes often reject or junk it and suggest an address on my own domain; the forms that send no email at all; and whether a mailer plugin is active. If there is none, say mail probably goes through the host's default mail, which inboxes often filter, and don't install anything without my yes. Ask me to open the latest entry of a form whose email is on under SureForms > Entries and read its logs: SureForms notes each email it handed to the mail server, or why the server refused it. Change nothing yet.
5. Wait for my yes on each fix. Whichever way you change it, if an email goes to a form field ({form:...} in email_to, email_cc or email_bcc), it goes to whatever address a visitor types: before switching it on, run sureforms/get-global-settings with categories ["security"]; a captcha on the form counts as protection, and srfm_honeypot true on its own is weak (SureForms' honeypot is a hidden field that most bots leave alone), so say so; read the form's captcha with the rest_api call from step 2, adding meta._srfm_captcha_security_type,meta._srfm_form_recaptcha to _fields: a meta._srfm_captcha_security_type of g-recaptcha (with v2-checkbox, v2-invisible or v3-reCAPTCHA in meta._srfm_form_recaptcha), hcaptcha or cf-turnstile counts only if both the matching site key (srfm_v2_checkbox_site_key, srfm_v2_invisible_site_key, srfm_v3_site_key, srfm_hcaptcha_site_key, srfm_cf_turnstile_site_key) and the matching secret key (the same name ending _secret_key) are set in those settings: a set secret comes back as @@SRFM_SECRET_UNCHANGED@@, an empty one as an empty string. Without the secret, SureForms skips the reCAPTCHA check. Treat v3-reCAPTCHA as weak: SureForms does not check its score. Tell me the result and wait for my yes. For a form's first email (the first item in its list), run sureforms/update-form with form_id and formMetaData {"emailNotification": {...}} holding only what changes: status true to switch it on, emailTo for a new address, emailCc or emailBcc set to "" to stop copies, fromEmail for a From address on my own domain; settings you leave out stay as they are. For any later email, or a form with none, run rest_api_write POST /wp/v2/sureforms_form/FORM_ID with body {"meta": {"_srfm_email_notification": LIST}}, where LIST is the whole list from step 2 with only that change (from_email for a From address on my own domain); leaving an item out deletes it. A new email is {"id": NEXT_ID, "status": true, "is_raw_format": false, "name": "Notification to NEW_ADDRESS", "email_to": "NEW_ADDRESS", "email_reply_to": "", "from_name": "{site_title}", "from_email": "{admin_email}", "email_cc": "", "email_bcc": "", "subject": "New entry: {form_title}", "email_body": "{all_data}"}, NEXT_ID being one more than the highest id in the list.
6. Read each changed form back as in step 2 and show me the result. Ask me to fill in each fixed form once with my own email address and check my inbox and spam folder; SureForms' entry logs show only that the email was handed to the mail server, so that test is the proof. Tell me how to undo each change: status false switches an email off, and an address change is undone by sending the old address back.
Already connected?

Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:

Run the “Fix Form Emails That Never Arrive with SureForms and AI” recipe from the WPVibe cookbook on my connected site.

You find out weeks later: a customer says they filled in your form and never heard back, and no email ever came. With SureForms the cause is often simple. The form’s email was switched off, it still goes to the site admin email nobody reads, it goes to an old address, or the site sends mail without a mailer plugin and inboxes file it as spam.

The AI checks every published form: each email, whether it is on, where it goes, who gets copies, then whether your site has a mailer plugin. It tells you what it found in plain words before changing anything. On your yes it switches an email back on or changes where it goes, a form at a time, and reads each one back.

Run it whenever form emails go quiet. Afterwards, fill a form in yourself and check your inbox and spam folder. SureForms notes on each entry whether its email was handed to your mail server or why it failed, but not whether it reached the inbox, so that test is the proof. If the site has no mailer plugin, the AI tells you; setting one up with your email provider takes a few minutes.

Outcome

Every form you rely on has its email on and going to the right address, and you know whether the site can deliver mail.