Installation and Basic Configuration

  1. FormM@iler has only two hidden fields, with one being required. The required hidden field is named "config". The value of the config hidden field will tell FormM@iler which group of configuration options to use. If the config field has a value="0" then it will use the configuration options that are listed with a [0] after the variable name. This is done to keep all information stored safely on the server to eliminate the likelihood of compromising the script by spammers or having recipients email addresses harvested by spambots. The second hidden field is optional and is used for spam control, which will be discussed later.

  2. Open the file formmailer.php with a text editor and find the line near the top:

    • Set the desired recipient email address by editing the value of the $tomail[#] variable to the email address desired.
      $tomail[0]="you@yourdomain.com";
    • Set which form fields you want to be included in the resulting email by making a comma delimited list of the desired fields in the $mail_fields[#] variable.
      $mail_fields[0]="list,of,fields";

  3. Upload form.php and formmailer.php to the same directory on your webserver. You do not need to chmod (change mode) any files.

  4. You are finished. Point your browser to form.php on your website!

Noteworthy comments:

  • Note: The "action" property of the form is set to assume form.php and formmailer.php are in the same directory. If you want to put your form page and formmailer.php in different directories, that's fine, just make sure the action value in the form tag still points to formmailer.php, for instance:
    <form id="form" method="post" action="scripts/mail/formmailer.php">

  • If you plan to use the file attachment option "enctype" must be added to the form tag.
    enctype="multipart/form-data"

  • You do not have to use form.php as your form, you can point any form, of any extension, to formmailer.php and it will work just the same. form.php and form2.php are simply provided as quick-start templates.