Web Hosting Canada Logo
 

How to Configure Form Mail for use on WeDoHosting.com Servers

FormMail
Basic instructions for using the form handling cgi script.

- For Advanced Configuration options, please click here

For our clients who need a form handler to take data from online forms and then email that data to their email address we provide a cgi script called FormMail.

This is a highly configurable script which takes all of its configuration information from the form fields in the forms that you create on your web pages.

An equivalent for PGP mail (dual-key encrypted mail) is available, but requires some setup on our server as well as your e-mail client. Please email support@wedohosting.com for further instructions.

Here is an example of the code used in a simple form:

<form action="http://scripts.wedohosting.com/common-cgi/formmail.cgi" method="POST">
<input type=hidden name="recipient" value="webmaster@yourdomain.com">
<input type=hidden name="redirect" value="http://www.yourdomain.com/thanks.htm">

Subject: <input type=text name="subject" size="30"><br><br>

Name: <input type=text name="name" size="40"><br><br>

Comment: <br><textarea name="comments" rows="4" cols="20"></textarea><br><br>
<input type=submit value="submit"> </form>


In the above example every time the form is filled out and submitted, the results will be sent to webmaster@yourdomain.com. Once the form is submitted the person's browser will be redirected to our home page at "http://www.wedohosting.com/".

In almost all cases you will want to make the "recipient" input type as hidden and set to your email address. The recipient MUST be an e-mail address at your domain name (ie, someone@yourdomain.com) to prevent this form from being used for e-mail spamming.

The "redirect" options is useful if you want to redirect a person who submitted a web form to a thank you page. If you do not use the redirect option the results of the form submission will be displayed to the browser with a thank you message.

The example form lets the user fill in three areas: a subject (which appears as the Subject line in the email), their name, and a comment.

Here is another example that will allow you to see the formating of the resulting email to you. Be sure to fill in YOUR email address. This page doesn't have a redirect set so the results of the form get displayed to the browser:

Your Email Address:

Subject:

Your Name:

Comment:

Here is the code for the form:

<form action="http://scripts.wedohosting.com/common-cgi/formmail.cgi" method="POST">
<input type=hidden name="recipient" value="webmaster@wedohosting.com">
<input type=hidden name="realname" value="Email Form">

Your Email Address: <input type=text name="email" size="30">
<br><br>

Subject: <input type=text name="subject" size="30">
<br><br>

Your Name: <input type=text name="name" size="40">
<br><br>

Comment: <br>
<textarea name="comments" rows="4" cols="20"></textarea>
<br><br>
<input type=submit value="submit">
</form>


In this example "recipient" is allowing you to input your email address as the "To:" field. This is so that you can recieve the emailed results and see how the "Your Name" and "Comment" entries are presented.

There are many more options you can use in the forms. Please see the link below to see what they are. Please also remember that these are "reserved" fields specific to the form and shouldn't be used as input "name" designations.

Click here for Advanced FormMail Configuration Files and Glossary of Possible Fields.

In the two example forms above "name" and "comments" are not reserved words in the formmail.cgi scripts and I was able to use them as input field in the forms.

Proudly Providing Web Hosting From Canada, For The World.

Web Hosting Services From Canada

WeDoHosting Canada: Virtual Web Hosting | Dedicated Servers | Server Colocation | Ecommerce Hosting | Specials
Linux Web Hosting: Linux | Dedicated Servers | High Storage | Virtual Dedicated Servers
Windows Web Hosting: ASP.Net | ColdFusion | Dedicated Windows Servers
Additional Services: Email Only Web Hosting | Managed Services | Private Label Hosting | Affiliate Program | Canada Domain Registration | Value Added Services | Canada-based Hosting Services | Premium Packages | Website Templates
Regional: Main | Canada | US

WeDoHosting Canada Corporate Information:
WeDoHosting Canada Home | Contact Us | Award Winning | Services Map | Online Resources | Internet Resources | Facilites in Canada | Privacy Policy | Large File Sending

 

WeDoHosting's SEO for "web hosting canada", "virtual hosting", and more
provided by Beanstalk Search Engine Positioning, Inc.

WeDoHosting.com Inc. #101-4226 Commerce Circle, Victoria BC Canada V8Z 6N6
Phone: 1-250-479-1595 Toll Free: 1-888-647-9336 Fax: 1-250-479-1517
A Division of FroZen Dirt Media Corp.

Terms of Service and Acceptable Use Policy