Why this exists
Every static site eventually needs a working contact form, and the usual answer is a third-party service: another account, another monthly fee, another place your client data flows through. If your site already runs on cPanel or any shared PHP host, none of that is necessary. PHP mail() has been sitting there the whole time.
I built this for my own client questionnaires and intake forms. One submit click sends two emails: a structured, branded notification to my inbox with every answer in a readable table, and a polished confirmation to the client that already looks like the quality of work they are hiring me for. This skill packages that whole setup so Claude builds it for any form in one pass.
How it works
- It asks for your config once Notification inbox, optional BCC backup, sending address, sender name, footer line. Saved to a config file so it never asks again. It never invents addresses.
- It reads your actual form Every input, textarea, select, and radio group is read from the HTML file. No guessed field names. Visible labels become the readable labels in the email.
- It writes the complete PHP handler Input sanitisation, a honeypot spam check, JSON responses, and two table-based HTML emails styled with your project's own brand colours.
- It updates the form and tests live The form action and JS handler are rewired with a mailto fallback if the server is unreachable. After you upload, it runs a curl test and debugs until the endpoint returns ok.
Step by step (for first-time users)
- Have an HTML form ready A contact form, a questionnaire, an intake brief. Any plain HTML form works.
- Open Claude Code in that project Navigate to the folder where your HTML file lives and launch Claude Code.
-
Type
/php-form-mailer path/to/your-page.htmlClaude asks for your five config values the first time: where notifications go, the sending mailbox, and your footer line. - Claude writes two files A self-contained PHP handler next to your HTML, and the updated HTML with the new form action and submit handler.
- Upload both to your server Same folder, any PHP host. Tell Claude when they are up.
- Claude runs the live test A curl POST against your real endpoint. If the host misbehaves (a wrong From mailbox is the usual culprit), Claude reads the response and fixes it.
What the two emails look like
| Goes to | Contains | |
|---|---|---|
| Notification | You (plus optional BCC backup) | Submitter name with reply-to link, phone if given, every answer in a sectioned table, empty fields skipped |
| Confirmation | The person who submitted | Personal greeting, what happens next, a clean copy of their answers, your branded footer |
Honest take
What it does well: The whole loop, not just the PHP file. Most form tutorials stop at "here is a mail() snippet" and leave you to discover why nothing arrives. This skill reads your real form fields, maps radio values to the human labels printed beside them, handles the PHP 8 string-type traps that silently kill shared-host handlers, and then actually tests the live endpoint and debugs the response codes. The confirmation email is the part clients notice: it looks like your brand, not like a receipt.
What it does not do: It will not fix a hosting problem. PHP mail() needs a correctly configured mailbox on the server, and if your host blocks it entirely, no generated code will change that (the skill tells you when that is the situation). It also does not do attachments, autoresponder sequences, or storage of submissions in a database. One form, two emails, done.
When to use it: Any time a static or hand-coded site needs a working form and you do not want a third-party service in the middle. Contact pages, client questionnaires, project intake briefs, event RSVPs. I use it for every client intake form I ship.