This article explains how to send form data to an email on your domain using FormMail Clone, the script already included with your hosting.
What is it used for?
FormMail Clone takes what the visitor fills out and sends it via email. It is sufficient for a simple contact form. It serves to:
- Receive inquiries from a contact page.
- Define the message subject and a thank-you page.
- Require visitors to complete certain fields before submitting.
Where the script is located: you do not need to install it. The form must be submitted to https://yourdomain.com/cgi-sys/FormMail.cgi. Replace yourdomain.com with your domain.
Configuring the form
- Create an email account under the same domain, for example
contact@yourdomain.com, from cPanel → Email → Email Accounts. That account will receive the messages. - Create an HTML page with the form. The
actionattribute must point to the script and the method must bepost. - Add these hidden fields:
recipient: the domain email address that receives the form.subject: the subject of the message.redirect: the full URL of the page the visitor will see if the submission is successful, for examplehttps://yourdomain.com/thank-you.html.required: the names of the mandatory fields, separated by commas.
- Include a visible field named
emailfor the visitor's email and, if you want their name in the message, another namedrealname. The rest of the fields (message, phone, etc.) can have whatever name you need. - Upload the page to
public_htmland test the form.
Minimal example:
<form action="https://yourdomain.com/cgi-sys/FormMail.cgi" method="post">
<input type="hidden" name="recipient" value="contact@yourdomain.com">
<input type="hidden" name="subject" value="Website inquiry">
<input type="hidden" name="redirect" value="https://yourdomain.com/thank-you.html">
<input type="hidden" name="required" value="realname,email,message">
<p><label>Name<br><input type="text" name="realname"></label></p>
<p><label>Email<br><input type="email" name="email"></label></p>
<p><label>Message<br><textarea name="message"></textarea></label></p>
<p><button type="submit">Send</button></p>
</form>
If you want a custom page when fields are missing, add another hidden field: missing_fields_redirect, with the full URL of that page.
Important: recipient must be an email under the same domain. To receive a copy in Gmail or another provider, create a forwarder in cPanel from that account. The form page and the redirect URLs must also be on your domain. For a form with file attachments, database storage, or integrations, request a quote through a sales ticket from the client portal.
Common issues
- Bad referer or referer not allowed: the form is hosted on another domain, or there is a mismatch with
www. Publish the page on the account's own domain. - Recipient not allowed:
recipientis not an email under your domain. Use a domain account and, if necessary, a forwarder. - Message does not arrive: check spam and verify that the email account exists. Send a test from the form.
- Thank-you page does not open:
redirectmust be a complete URL, includinghttps://. - cgi-sys/FormMail.cgi throws an error or does not exist: the server script is not available for that account.
If the form does not send, the script does not respond, or you need a custom version, open a ticket from the client portal or reach out via the site's live chat.
