How do I create a contact form that will send an email?
Built into the CPanel control panel is a form mailer script you can use to send the results of a form to yourself via e-mail.
Simply create an html form, and set the action attribute to /cgi-sys/formmail.pl
In your html form, include the following hidden fields (case sensitive, don't capitalize):
recipient: The e-mail address where the form data will be sent
subject: The subject line for the e-mail
The following hidden field is optional:
redirect: Thank you page to redirect to after submission
Also include the following recommended visible fields in your form:
email: The e-mail address of the form submitter
realname: The name of the form submitter
Include fields for any other information you want to collect, and they'll be included in the e-mail.
A simple example form:
The downside to this approach is that the recipient email address is embedded in the form, and can be harvested by spam bots.
If you'd rather not have an email address embedded into the form, try this free, third party form mail solution:
Tectite
The nice thing about this script is that it allows you to configure the script from their website via an online wizard, and then you are presented with a fully configured mail form that you can download.
Comment
or post as a guest
Be the first to comment.