Phorm v3.5.2

Emailing Form Contents:

      One of the most-commonly-desired actions in processing a form is emailing the contents to the user (you). To email the form contents, define the following variables (and remember - any of these can be set in hidden form fields, in regular form fields, or in either of the configuration files):

$PHORM_TMPL The name of a text template file containing the message to be emailed to user. If not specified, contents are not mailed.
$PHORM_TO Email address to send the contents to. It is required if $PHORM_TMPL is specified. If it is not set and $PHORM_ALERTTO is, $PHORM_TO will be set to the value of $PHORM_ALERTTO
$PHORM_FROM Email address for the FROM field of the emailed contents, usually the email address of the visitor. If it is not set, Phorm will check for a form field name Email, EMail or email, and use that if it exists; otherwise $PHORM_FROM will be set to the value of $PHORM_TO
$PHORM_SUBJECT Subject field for emailed contents.
$PHORM_HEADERS Any additional email headers desired, such as X- headers. If you don't know what this means, then it is very unlikely you'll need to use it.
$PHORM_EFROM An alternate FROM address for the email. If it is set, it overrides $PHORM_FROM. Generally it would be used when you have more than one email template, to assign different FROM addresses to the different templates.
Template Format
      The template file named in $PHORM_TMPL may contain any text you desire, plus variable substitutions. For example:
   Form contents:
   Name: {{name}}
   Email: {{PHORM_FROM}}
   Comments: {{comments}}
Additional Email Headers
      If you wish to have any additional email headers in the message, set them in $PHORM_HEADERS. Don't forget to end each one with a newline character (\n). The X-Mailer header is reserved for Phorm.

Multiple User Emails
      If you wish to send more than one email from a single form, $PHORM_TMPL and the other email variables can be defined as arrays. For example:
   $PHORM_TMPL[1]    = "email.txt";
   $PHORM_TO[1]      = "manager@mydomain.com";

   $PHORM_TMPL[2]    = "email2.txt";
   $PHORM_TO[2]      = "sysadmin@mydomain.com";
   $PHORM_SUBJECT[2] = "Email #2";
   $PHORM_EFROM[2]   = "me@mydomain.com";
      The maximum number of templates is 25. If you wish, you can include email headers in the template itself. For example:
   To: orders@mydomain.com
   From: Phorm v3.0 <phorm@mydomain.com>
   Subject: Order In

   Please send one {{color}} widget to {{name}}.
      Any such headers will be overriden by their respective $PHORM_ variables. There must not be any blank lines at the beginning of the file or in the headers section, and there must be a blank line between the headers and the body of the message. If you choose to do the headers this way, you must indicate it by adding +h after the file name in $PHORM_TMPL:
   $PHORM_TMPL[1] = "email.txt +h";
      Note: The intent of this email function is to send information to you, the user. The reason I added the ability to have secondary templates was to allow you to send information to, say, different departments in your organization. While it is possible to send an email to the visitor using a secondary email template, it is my experience that you can end up confusing yourself if you do it this way. To send an acknowledgement to the visitor, use the autoresponder function.

Attaching a File
[This feature is available only to registered users]

      If one or more files have been uploaded with your form, you can have them attached to the email sent to you. Simply enclose the field name in double curly braces, just as you would for any regular field.

      For the sake of simplicity, all files will be Base64 encoded, regardless of type. I just don't feel like mucking about with different types. If you don't know what this means, you don't need to worry about it.

0101000001101000011011110111001001101101010010010111001101000011011011110110111101101100