How to send information from forms - FormMail

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

  1. Create an email account under the same domain, for example contact@yourdomain.com, from cPanel → Email → Email Accounts. That account will receive the messages.
  2. Create an HTML page with the form. The action attribute must point to the script and the method must be post.
  3. 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 example https://yourdomain.com/thank-you.html.
    • required: the names of the mandatory fields, separated by commas.
  4. Include a visible field named email for the visitor's email and, if you want their name in the message, another named realname. The rest of the fields (message, phone, etc.) can have whatever name you need.
  5. Upload the page to public_html and 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: recipient is 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: redirect must be a complete URL, including https://.
  • 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.

  • formulario de contacto, formmail, config.php, configuraciones basicas
  • 10 Users Found This Useful
Was this answer helpful?

Related Articles

PHP Scripts - Activating PHP support for the service.

This document contains information on how to choose or change the PHP version for each domain...

I cannot view the images on my cPanel services subdomain

This document contains information to resolve the issue of images not displaying on a subdomain...

DomainKeys and SPF - Prevent identity spoofing.

This document contains information to protect your domain against identity spoofing, configuring...

DomainKeys for sending email

This document contains information to verify and activate DKIM, SPF, and DMARC on your domain...

How to create a website using a builder

This document contains information to install SitePad Website Builder from Softaculous in cPanel...