Facebook - InterKan.NetTwitter - InterKan.NetLinkedIn - InterKan.Net
(785) 565-0991
(785) 565-0991

Form Mailer

Form Mailer - Fields


These fields are used to tell PhormMailer what actions to perform. They must contain either a path to a template file or a complete URL and must be formatted as:

<input type="hidden" name="[field_name]" value="[path or url]">

Field NameDescription
_send_email This sends an email using the template specified in the field. Multiple email templates can be specified by ending each field with a different character (e.g., "_send_email1", "_send_email2", "_send_maila", and so on). See Templates for additional information.
_browser_out This displays the template content in the browser. See templates for additional information.
_redirect After the form has been submitted, the browser is redirected to the URL specified in this tag.
_error_path The value of this field should be the path to an error message template. The contents of this template will display the error message if one occurs. See Templates for more information.
_error_url The browser is redirected to this URL if an error occurs.
_multi_separator This value determines what text/character is placed between multiple value fields (see the "m" flag). Defaults to ", ".
_format_decimals This value determines the number of decimal places to display on calculations. Defaults to zero (0).
_attachment To send files through the form, you can put FILE input fields in your form. To specify multiple attachments, add square brackets to the end of the name – “_attachment[]” (without the quotes). Note that submitted files are limited to 2 MB each (10 MB total) and can only the file extensions .JPG, .PDF, .DOC, .RTF, .TXT, .TIF, .XLS, .PPT or .PUB. This field also cannot be required with the "r" flag.
_send_mail_attachment Uses in place of or in conjunction with the above _send_mail field. Attachments will only be sent to these emails, not the general _send_mail entries.

Form Mailer - Flags


The form mailer has several flags that can be placed on fields and certain field names that can be used to invoke certain actions (such as sending an email or displaying content to a browser).

The flags must be placed at the beginning of the field name, followed by an underscore. If there are no flags for a field, the first character of the field name must be an underscore ("_").

Descriptions for all flags are as follows:

r Denotes the field is required. Any empty field marked with this flag will generate an error.
e Requires the field to contain a properly formatted email address.
d The field may only contain digits (0-9) or a decimal point.
c This flag denotes fields which can contain digits (0-9), a decimal point, or a dollar sign ($).
w The field may only contain word characters (A-Z, 0-9).
p The field may only contain a valid credit card number (validates using a MOD10 check).
Note: This does not guarantee the account is valid, only that the number passes this simple test.
m Used to store multiple values in the same field name. This is especially useful for checkboxes with the same name.

Note: You must place square brackets at the end of this field name in order for multiple values to be stored (i.e. the field name should be something like "m_Services[]").
n Removes any line breaks (any place the user pressed Enter or Return) from the field.
s Removes leading and trailing white space.

Form Mailer

General • FlagsFields

General Setup

  1. Create your page with a form and set it to post to "/Phorm-bin/mailer.php", for example: <form action="/Phorm-bin/mailer.php" method="post" name="form" id="form">. There is no software is necessary to install on the server.
  2. Next, you'll need to enter your fields within the form, set their flags and define the necessary special fields to determine the Form Mailer's behavior.
  3. After that, you'll need to setup your templates to control the output to the web browser and to control the format of the email messages sent.


Template file names are arbitrary. The file extension is irrelevant to the application. Inside the template, use square brackets ([ and ]) or curly braces ({ and }) to denote placement inside the file or email. Field names between brackets or braces must exactly match the field name on the web form, including capital and lowercase letters and flags. In the case of multiple select fields, you should leave off the additional square brackets; i.e. [m_Services[]] would become [m_Services] in the template file.

For email templates, be sure the first three lines are set up as:

To: <email address or email address field>
From: <email address or email address field>
Subject: <Message Subject>

Templates can also include environment variables such as the IP address (REMOTE_ADDR) or user agent (HTTP_USER_AGENT). To include environment variables, use the following:


Note: Environment variables have been limited to REMOTE_HOST, REMOTE_ADDR, and HTTP_USER_AGENT.

To conduct mathematical calculations using submitted values, place the calculation (using numbers and/or field markers) between either:

"[<" and ">]" OR "{<" and ">}"

Example: {< {rd_Nu mber} / 2 >} would divide the value submitted in rd_Number in half and display the value in place of the marker.

Error templates have only two valid output markers: [%OUT_TITLE] and [%OUT_MSG] (note that the square brackets can also be replaced with curly braces).