Home Guides & FAQ

How do I set up FormMail?

The following piece of code is only an example of how FormMail could be used.
Make corrections to the different fields to match your website.
  1. Replace example.com with your own domain.
  2. Replace email@example.com with your own mail address.
  3. Create a web page where your visitors will be redirected after the mail was sent,
    and replace this location with the new page:


  4. Finally, create a page where your visitors will be redirected when an error occurs,
    and replace this location with your new page:


  5. Insert the code on your website.
<form method="post" action="http://www.example.com/cgi-bin/FormMail.pl" accept-charset="ISO-8859-1" onsubmit="var originalCharset = document.charset; document.charset = 'ISO-8859-1'; window.onbeforeunload = function () {document.charset=originalCharset;};"> Name <br /> <input name="realname" /> <br /> Email <br /> <input name="email" /> <br /> Message <br /> <textarea cols="40" rows="10" name="Message"></textarea> <br /> <input type="submit" value="Send" /> <input type="hidden" name="recipient" value="email@example.com" /> <input type="hidden" name="subject" value="Subject" /> <input type="hidden" name="redirect" value="http://www.example.com/thanks.html" /> <input type="hidden" name="missing_fields_redirect" value="http://www.example.com/error.html" /> <input type="hidden" name="required" value="realname,email,Message" /> </form>