Contact Form Processing Products - for all your needs

FormMail • Form Encryption • Hosted Forms

FILTERS Setting

This page documents the FILTERS configuration setting in FormMail.

Type Of Setting

FILTERS is an OPTIONAL setting, which means...

OPTIONAL : you can change this setting if you need to, but the default value is fine for most circumstances.

Précis

Defines filters, especially the encryption mechanism.

Description

Set FILTERS to the filter programs you want to support. A filter program is used to process the data before sending in email. For example, an encryption program can be used to encrypt the mail.

Note that formmail.php changes to the directory/folder of the filter program before running the filter, so file name arguments are relative to that directory.

The format for each filter program is:

"name"=>"program path [program options]"

Here's an example:

$FILTERS = array("encode"=>"$REAL_DOCUMENT_ROOT/cgi-bin/fmencoder");

This says that when the form specifies a 'filter' value of "encode", run the email through this program: $REAL_DOCUMENT_ROOT/cgi-bin/fmencoder

You can use the special variable $REAL_DOCUMENT_ROOT to refer to the top of your web server Document Root directory/folder.

The program can also be outside of the web server directory, e.g.: /home/yourname/bin/fmencoder

The default value below is ready for use with FormMailEncoder. FormMailEncoder allows your form results to be strongly encrypted before being mailed to you.

Use this to collect credit card payments from your customers or just to keep their details private.

You need our FormMailDecoder product to decrypt these messages. You can purchase FormMailDecoder from us (FormMailEncoder is included free of charge).

The FILTERS setting has no effect unless your HTML forms request their use. So, you can leave it set to its default value.

Please note that on Windows servers, you can use '/' to separate directory/folder names. But, if you use '\', then you must double it like this:

"encode"=>"d:\\websites\\yoursite\\fmencoder.exe -kpubkey.txt"

or

"encode"=>"d:/websites/yoursite/fmencoder.exe -kpubkey.txt"

Note: the "null" filter does nothing to the message. You can use the null filter for testing your form prior to changing to a real filter.

You can also use the null filter to attach the form submission to the email instead of having it in the body of the email (use the filter_options "Attach=filename" feature).

Default Value

$FILTERS = array("encode"=>"$REAL_DOCUMENT_ROOT/cgi-bin/fmencoder -kpubkey.txt",
   "null"=>"null",
   "csv"=>"csv");

See Also