FormMail.
*
* Author: Russell Robinson, 2nd October 2001
*
* Read This First
* ~~~~~~~~~~~~~~~
* This script is very well documented and quite large! It looks daunting,
* but really isn't.
* If you have experience with PHP or other scripting languages,
* here's what you *need* to read:
* - Configuration (TARGET_EMAIL & DEF_ALERT)
* - Creating Forms
* That's it! (Alternatively, just read the Quick Start and/or
* Quicker Start section below).
* Full configuration documentation is here:
* http://www.tectite.com/fmdoc/index.php
*
* NOTE: do not read or modify this script or any PHP script
* with DreamWeaver or FrontPage!
* Many versions of those programs silently corrupt PHP scripts.
*
* Purpose:
* ~~~~~~~~
* To accept information from an HTML form via HTTP and mail it to recipients.
*
* What does this PHP script do?
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* On your web site, you may have one or more HTML forms that accept
* information from people visiting your website. Your aim is for your
* website to email that information to you and/or add it to a database.
* FormMail performs those functions.
*
* Quick Start
* ~~~~~~~~~~~
* 1. Edit this file and set TARGET_EMAIL for your requirements (near
* line 246 in this file - replace "yourhost\.com" with your mail server's
* name). We also strongly recommend you set DEF_ALERT (the next
* configuration below TARGET_EMAIL).
* 2. Install this file as formmail.php (or other name ending in .php)
* on your web server.
* Test alerts by using your browser to open a URL to the script:
* http://www.yourhost.com/formmail.php?testalert=1
* Alerts are the only way FormMail can tell you the details of
* errors or faults.
* 3. Create an HTML form and:
* - specify a hidden field called "recipients" with the email address
* of the person to receive the form's results.
* - in the your form tag set the action attribute to
* the formmail.php you uploaded to your web server
*
* Once you have FormMail working, you may be interested in some advanced
* usage and features. We have HOW-TO guides at www.tectite.com which
* describe many of the advanced processing you can do with FormMail.
* http://www.tectite.com/fmhowto/guides.php
*
* Quicker Start
* ~~~~~~~~~~~~~
* Use the FormMail Configuration Wizard here:
* http://www.tectite.com/wizards/fmconf.php
* By answering a few questions you'll get a configured FormMail and
* a sample HTML form ready to upload and use on your server.
*
* Features
* ~~~~~~~~
* For a list of features go to: http://www.tectite.com/formmailpage.php
*
* Security
* ~~~~~~~~
* Security is the primary concern in accepting data from your website
* visitors.
* Tectite FormMail has several security features designed into it. Note,
* however, it requires configuration for your particular web site.
*
* Configuration
* ~~~~~~~~~~~~~
* To configure this script, go to the section titled "CONFIGURATION"
* (after reading the legal stuff below).
*
* There is only one mandatory setting: TARGET_EMAIL
* and one strongly recommended setting: DEF_ALERT
*
* Full configuration information is available here:
* http://www.tectite.com/fmdoc/index.php
*
* Creating Forms
* ~~~~~~~~~~~~~~
* Go to this URL to learn how to write HTML forms for use with
* Tectite FormMail: http://www.tectite.com/fmdoc/creating_forms.php
*
* Copying and Use (Software License)
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Tectite FormMail is provided free of charge and may be freely distributed
* and used provided that you:
* 1. keep this header, including copyright and comments,
* in place and unmodified; and,
* 2. do not charge a fee for distributing it, without an agreement
* in writing with Root Software allowing you to do so; and,
* 3. if you modify FormMail before distributing it, you clearly
* identify:
* a) who you are
* b) how to contact you
* c) what changes you have made
* d) why you have made those changes.
*
* By using any of our products, including this script, you are
* agreeing to our standard Terms and Conditions, available here:
* http://www.tectite.com/TermsAndConditions.pdf
*
* This is free software and the Software License shown above
* is to be read in conjunction with our standard Terms and Conditions.
*
* Warranty and Disclaimer
* ~~~~~~~~~~~~~~~~~~~~~~~
* Tectite FormMail is provided free-of-charge and with ABSOLUTELY NO WARRANTY.
* It has not been verified for use in critical applications, including,
* but not limited to, medicine, defense, aircraft, space exploration,
* or any other potentially dangerous activity.
*
* By using Tectite FormMail you agree to indemnify Root Software and
* Open Concepts (Vic) Pty Ltd, their agents, employees, directors and
* associated companies and businesses from any liability whatsoever.
*
* We still care
* ~~~~~~~~~~~~~
* If you find a bug or fault in FormMail, please report it to us.
* We will respond to your report and make endeavours to rectify any
* faults you've detected as soon as possible.
*
* To contact us please register on our forums at:
* http://www.tectite.com/vbforums/
* or view our contact information:
* http://www.tectite.com/contacts.php
*
* Version History
* ~~~~~~~~~~~~~~~
* Near the top of this file, you'll find its version. The version
* line looks like this:
* $FM_VERS = "N.MM"; /* script version ...
*
* The version history used to be located within this file. However,
* starting with Version 8.00 we've moved it...
*
* You can read the complete version history of FormMail on our
* main website here:
* http://www.tectite.com/fmdoc/version_history.php
*/
//
// Capture the current date and time, for various purposes.
//
$lNow = time();
set_magic_quotes_runtime(0); // disable this silly setting (usually not enabled)
ini_set('track_errors',1); // enable $php_errormsg
$aAlertInfo = array();
$aPHPVERSION = array();
$sLangID = ""; // the language ID
$aMessages = array(); // all FormMail messages in the appropriate
// language
$bUseOldVars = IsOldVersion($aPHPVERSION);
//
// seed the random number generate if not version 4.2.0 or later
//
if (!IsPHPAtLeast("4.2.0"))
mt_srand(time());
//
// we set references to the appropriate arrays to handle PHP version differences
// Session vars are selected after we start the session.
//
if ($bUseOldVars)
{
$aServerVars = &$HTTP_SERVER_VARS;
$aGetVars = &$HTTP_GET_VARS;
$aFormVars = &$HTTP_POST_VARS;
$aFileVars = &$HTTP_POST_FILES;
$aEnvVars = &$HTTP_ENV_VARS;
}
else
{
$aServerVars = &$_SERVER;
$aGetVars = &$_GET;
$aFormVars = &$_POST;
$aFileVars = &$_FILES;
$aEnvVars = &$_ENV;
}
$bIsGetMethod = false;
//
// If the form submission was using the GET method, switch to the
// GET vars instead of the POST vars
//
if (isset($aServerVars["REQUEST_METHOD"]) && $aServerVars["REQUEST_METHOD"] === "GET")
{
$bIsGetMethod = true;
if ($bUseOldVars)
$aFormVars = &$HTTP_GET_VARS;
else
$aFormVars = &$_GET;
}
if (!isset($REAL_DOCUMENT_ROOT))
SetRealDocumentRoot();
if (isset($aServerVars['SERVER_PORT']))
$SCHEME = ($aServerVars['SERVER_PORT'] == 80) ? "http://" : "https://";
else
$SCHEME = "";
if (isset($aServerVars['SERVER_NAME']) && $aServerVars['SERVER_NAME'] !== "")
$SERVER = $aServerVars['SERVER_NAME'];
elseif (isset($aServerVars['SERVER_ADDR']) && $aServerVars['SERVER_ADDR'] !== "")
$SERVER = $aServerVars['SERVER_ADDR'];
else
$SERVER = "";
/*****************************************************************************/
/* CONFIGURATION (do not alter this line in any way!!!) */
/*****************************************************************************
* This is the *only* place where you need to modify things to use formmail.php
* on your particular system. This section finishes at "END OF CONFIGURATION".
* Help for all settings can be found on our website:
* http://www.tectite.com/fmdoc/index.php
*
* Also, above each setting is a direct URL to the help information for the
* setting.
*****************************************************************************/
/* Help: http://www.tectite.com/fmdoc/email_name.php */
define("EMAIL_NAME","^[-a-z0-9.]+"); // the '^' is an important security feature!
/* Help: http://www.tectite.com/fmdoc/target_email.php */
$TARGET_EMAIL = array(rob."@rapidspray\.com$");
/* Help: http://www.tectite.com/fmdoc/def_alert.php */
define("DEF_ALERT","rob@rapidspray.com");
/* Help: http://www.tectite.com/fmdoc/set_real_document_root.php */
$SET_REAL_DOCUMENT_ROOT = ""; // overrides the value set by SetRealDocumentRoot function
//
// override $REAL_DOCUMENT_ROOT from the $SET_REAL_DOCUMENT_ROOT value (if any)
// Do not alter the following code (next 3 lines)!
//
if (isset($SET_REAL_DOCUMENT_ROOT) && $SET_REAL_DOCUMENT_ROOT !== "")
$REAL_DOCUMENT_ROOT = $SET_REAL_DOCUMENT_ROOT;
/* Help: http://www.tectite.com/fmdoc/config_check.php */
$CONFIG_CHECK = array("TARGET_EMAIL");
/* Help: http://www.tectite.com/fmdoc/at_mangle.php */
define("AT_MANGLE","");
/* Help: http://www.tectite.com/fmdoc/target_urls.php */
$TARGET_URLS = array(); // default; no URLs allowed
/* Help: http://www.tectite.com/fmdoc/head_crlf.php */
define("HEAD_CRLF","\r\n");
/* Help: http://www.tectite.com/fmdoc/body_lf.php */
define("BODY_LF","\r\n"); // the new default: use this for CR+LF
//define("BODY_LF","\n"); // the old default: just LF
/* Help: http://www.tectite.com/fmdoc/from_user.php */
$FROM_USER = ""; // the default - setting not used
/* Help: http://www.tectite.com/fmdoc/sendmail_f_option.php */
define("SENDMAIL_F_OPTION",false);
define("SENDMAIL_F_OPTION_LINE",__LINE__-1); // don't modify this line!
/* Help: http://www.tectite.com/fmdoc/fixed_sender.php */
$FIXED_SENDER = "";
/* Help: http://www.tectite.com/fmdoc/set_sender_from_email.php */
define("SET_SENDER_FROM_EMAIL",false);
/* Help: http://www.tectite.com/fmdoc/ini_set_from.php */
define("INI_SET_FROM",false);
/* Help: http://www.tectite.com/fmdoc/logdir.php */
$LOGDIR = ""; // directory for log files; empty string to
// disallow log files
/* Help: http://www.tectite.com/fmdoc/autorespondlog.php */
$AUTORESPONDLOG = ""; // file name in $LOGDIR for the auto responder
// log; empty string for no auto responder log
/* Help: http://www.tectite.com/fmdoc/csv_file_settings.php */
$CSVDIR = ""; // directory for csv files; empty string to
// disallow csv files
$CSVSEP = ","; // comma separator between fields (columns)
$CSVINTSEP = ";"; // semicolon is the separator for fields (columns)
// with multiple values (checkboxes, etc.)
$CSVQUOTE = '"'; // all fields in the CSV are quoted with this character;
// default is double quote. You can change it to
// single quote or leave it empty for no quotes.
//$CSVQUOTE = "'"; // use this if you want single quotes
$CSVOPEN = ""; // set to "b" to force line terminations to be
// kept as $CSVLINE setting below, regardless of
// operating system. Keep as empty string and
// leave $CSVLINE unchanged, to get text file
// terminations for your server's operating system.
// (Line feed on UNIX, carriage-return line feed on Windows).
$CSVLINE = "\n"; // line termination for CSV files. The default is
// a single line feed, which may be modified for your
// server's operating system. If you want to change
// this value, you *must* set $CSVOPEN = "b".
/* Help: http://www.tectite.com/fmdoc/templatedir.php */
$TEMPLATEDIR = ""; // directory for template files; empty string
// if you don't have any templates
/* Help: http://www.tectite.com/fmdoc/templateurl.php */
$TEMPLATEURL = ""; // default; no template URL
/* Help: http://www.tectite.com/fmdoc/multiformdir.php */
$MULTIFORMDIR = ""; // directory for multi-form template files; empty string
// if you're not using multi-forms
/* Help: http://www.tectite.com/fmdoc/multiformurl.php */
$MULTIFORMURL = ""; // default; no multi-forms templates URL
/* Help: http://www.tectite.com/fmdoc/authentication_settings.php */
$AUTHENTICATE = "";
//$AUTHENTICATE = "Basic cnVzc2VsbHI6dGVzdA=="; // example
$AUTH_USER = "";
$AUTH_PW = "";
/* Help: http://www.tectite.com/fmdoc/form_ini_file.php */
$FORM_INI_FILE = "";
/* Help: http://www.tectite.com/fmdoc/moduledir.php */
$MODULEDIR = ".";
/* Help: http://www.tectite.com/fmdoc/fmcompute.php */
$FMCOMPUTE = "fmcompute.php";
/* Help: http://www.tectite.com/fmdoc/fmgeoip.php */
$FMGEOIP = "fmgeoip.php";
/* Help: http://www.tectite.com/fmdoc/advanced_templates.php */
define("ADVANCED_TEMPLATES",false); // set to true for advanced templates
/* Help: http://www.tectite.com/fmdoc/limited_import.php */
define("LIMITED_IMPORT",true); // set to true if your database cannot
// handle escaped quotes or newlines within
// imported data. Microsoft Access is one
// example.
/* Help: http://www.tectite.com/fmdoc/valid_env.php */
$VALID_ENV = array('HTTP_REFERER','REMOTE_HOST','REMOTE_ADDR','REMOTE_USER',
'HTTP_USER_AGENT');
/* Help: http://www.tectite.com/fmdoc/fileuploads.php */
define("FILEUPLOADS",false); // set to true to allow file attachments
/* Help: http://www.tectite.com/fmdoc/max_file_upload_size.php */
define("MAX_FILE_UPLOAD_SIZE",0); // default of 0 means that other software
// controls the maximum file upload size
// (FormMail doesn't test the file size)
/* Help: http://www.tectite.com/fmdoc/file_repository.php */
$FILE_REPOSITORY = "";
/* Help: http://www.tectite.com/fmdoc/file_mode.php */
define("FILE_MODE",0664); // always precede with 0 to specify octal!
/* Help: http://www.tectite.com/fmdoc/file_overwrite.php */
define("FILE_OVERWRITE",true);
/* Help: http://www.tectite.com/fmdoc/next_num_file.php */
$NEXT_NUM_FILE = "";
/* Help: http://www.tectite.com/fmdoc/put_data_in_url.php */
define("PUT_DATA_IN_URL",true); // set to true to place data in the URL
// for bad_url redirects
/* Help: http://www.tectite.com/fmdoc/db_see_input.php */
define("DB_SEE_INPUT",false); // set to true to just see the input values
/* Help: http://www.tectite.com/fmdoc/db_see_ini.php */
define("DB_SEE_INI",false); // set to true to just see the ini file
/* Help: http://www.tectite.com/fmdoc/maxstring.php */
define("MAXSTRING",1024); // maximum string length for a value
/* Help: http://www.tectite.com/fmdoc/require_captcha.php */
$REQUIRE_CAPTCHA = ""; // set to a message string if your forms
// must provide a CAPTCHA string
/* Help: http://www.tectite.com/fmdoc/bshowmesgnumbers.php */
$bShowMesgNumbers = false;
/* Help: http://www.tectite.com/fmdoc/filters.php */
/* Note for Tectite personnel: the upgrade Wizard will merge new values
* but be careful of $var usage and quoting in new entries.
*/
$FILTERS = array("encode"=>"$REAL_DOCUMENT_ROOT/cgi-bin/fmencoder -kpubkey.txt",
"null"=>"null",
"csv"=>"csv");
/* Help: http://www.tectite.com/fmdoc/socket_filters.php */
$SOCKET_FILTERS = array(
"httpencode"=>array("site"=>"YourSiteHere",
"port"=>80,
"path"=>"/cgi-bin/fmencoder",
"params"=>array(array("name"=>"key",
"file"=>"$REAL_DOCUMENT_ROOT/cgi-bin/pubkey.txt"))),
"sslencode"=>array("site"=>"ssl://YourSecureSiteHere",
"port"=>443,
"path"=>"/cgi-bin/fmencoder",
"params"=>array(array("name"=>"key",
"file"=>"$REAL_DOCUMENT_ROOT/cgi-bin/pubkey.txt"))),
);
/* Help: http://www.tectite.com/fmdoc/filter_attribs.php */
$FILTER_ATTRIBS = array("encode"=>"Strips,MIME=application/vnd.fmencoded,Encrypts",
"httpencode"=>"Strips,MIME=application/vnd.fmencoded,Encrypts",
"sslencode"=>"Strips,MIME=application/vnd.fmencoded,Encrypts",
"csv"=>"Strips,MIME=text/csv",);
/* Help: http://www.tectite.com/fmdoc/check_for_new_version.php */
define("CHECK_FOR_NEW_VERSION",true);
define("CHECK_DAYS",30);
/* Help: http://www.tectite.com/fmdoc/scratch_pad.php */
$SCRATCH_PAD = "";
/* Help: http://www.tectite.com/fmdoc/cleanup_time.php */
$CLEANUP_TIME = 60; // cleanup time in minutes
/* Help: http://www.tectite.com/fmdoc/cleanup_chance.php */
$CLEANUP_CHANCE = 20; // percentage probability that cleanup will be performed
/* Help: http://www.tectite.com/fmdoc/pear_settings.php */
$PEAR_SMTP_HOST = "";
$PEAR_SMTP_PORT = 25;
$PEAR_SMTP_USER = "";
$PEAR_SMTP_PWD = "";
/* Help: http://www.tectite.com/fmdoc/alert_on_user_error.php */
define("ALERT_ON_USER_ERROR",true);
/* Help: http://www.tectite.com/fmdoc/enable_attack_detection.php */
define("ENABLE_ATTACK_DETECTION",true);
/* Help: http://www.tectite.com/fmdoc/attack_detection_url.php */
define("ATTACK_DETECTION_URL","");
/* Help: http://www.tectite.com/fmdoc/alert_on_attack_detection.php */
define("ALERT_ON_ATTACK_DETECTION",false);
/* Help: http://www.tectite.com/fmdoc/attack_detection_mime.php */
define("ATTACK_DETECTION_MIME",true);
/* Help: http://www.tectite.com/fmdoc/attack_detection_junk.php */
define("ATTACK_DETECTION_JUNK",false);
define("ATTACK_DETECTION_JUNK_CONSONANTS","bcdfghjklmnpqrstvwxz");
define("ATTACK_DETECTION_JUNK_VOWELS","aeiouy");
define("ATTACK_DETECTION_JUNK_CONSEC_CONSONANTS",5);
define("ATTACK_DETECTION_JUNK_CONSEC_VOWELS",4);
define("ATTACK_DETECTION_JUNK_TRIGGER",2);
$ATTACK_DETECTION_JUNK_LANG_STRIP = array(
"aiia", /* Hawaiian */
"aeoa", /* palaeoanthropic */
"aeoe", /* palaeoethnic */
"ooee", /* cooee */
"oeia", /* pharmacopoeia */
"ioau", /* radioautograph */
"uaia", /* guaiac */
"ueou", /* aqueous */
"uiou", /* obsequious */
"queue", /* queue, queueing */
"earth", /* earthquake, earthslide */
"cks", /* jockstrap, backscratcher */
"ngth", /* strengths, length */
"ndths", /* thousandths */
"ght", /* nightclub, knightsbridge */
"phth", /* ophthalmology */
"sch", /* rothschild */
"shch", /* borshch */
"scr", /* corkscrew */
"spr", /* wingspread, offspring */
"str", /* armstrong, songstress */
"sts", /* bursts, postscript */
"tch", /* catchphrase, scratchproof */
"thst", /* northstar, birthstone */
"http", /* https, http */
"html", /* HTML, XHTML */
);
/* Help: http://www.tectite.com/fmdoc/attack_detection_dups.php */
$ATTACK_DETECTION_DUPS = array("realname","address1","address2","country","zip",
"phone","postcode","state","email");
/* Help: http://www.tectite.com/fmdoc/attack_detection_specials.php */
define("ATTACK_DETECTION_SPECIALS",true);
/* Help: http://www.tectite.com/fmdoc/attack_detection_specials.php */
$ATTACK_DETECTION_SPECIALS_ONLY_EMAIL = array("derive_fields","required",
"mail_options","good_url","bad_url","good_template",
"bad_template");
/* Help: http://www.tectite.com/fmdoc/attack_detection_specials.php */
$ATTACK_DETECTION_SPECIALS_ANY_EMAIL = array("subject");
/* Help: http://www.tectite.com/fmdoc/attack_detection_many_urls.php */
define("ATTACK_DETECTION_MANY_URLS",0);
/* Help: http://www.tectite.com/fmdoc/attack_detection_many_url_fields.php */
define("ATTACK_DETECTION_MANY_URL_FIELDS",0);
/* Help: http://www.tectite.com/fmdoc/attack_detection_url_patterns.php */
$ATTACK_DETECTION_URL_PATTERNS = array(
'(^|[^-a-z_.0-9]+)(? Jump to:
//
// Return true if using the built-in language
//
function IsBuiltInLanguage()
{
global $sLangID;
return (strpos($sLangID,"builtin") !== false);
}
$sSavePath = "";
$bPathSaved = false;
//
// Set include path to include the given directory.
//
function AddIncludePath($s_dir = ".")
{
global $sSavePath,$bPathSaved;
$s_path = ini_get('include_path');
$i_path_len = strlen($s_path);
$s_sep = IsServerWindows() ? ";" : ":"; // get path separator
//
// look for it in the include_path
//
$b_found = false;
$i_pos = 0;
$i_len = strlen($s_dir);
while (!$b_found && ($i_pos = strpos($s_path,$s_dir,$i_pos)) !== false)
{
if ($i_pos == 0)
{
if ($i_len == $i_path_len)
$b_found = true; // the path only has $s_dir
elseif ($s_path{$i_len} == $s_sep)
$b_found = true;
}
elseif ($s_path{$i_pos-1} == $s_sep &&
($i_pos + $i_len == $i_path_len ||
$s_path{$i_pos + $i_len} == $s_sep))
$b_found = true;
if (!$b_found)
$i_pos++;
}
if (!$b_found)
{
//
// allow multiple calls, but only store the original path once
//
if (!$bPathSaved)
$sSavePath = $s_path;
if (empty($s_path))
$s_path = $s_dir;
else
//
// prepend the directory
//
$s_path = $s_dir.$s_sep.$s_path;
ini_set('include_path',$s_path);
$bPathSaved = true;
}
}
//
// Reset the include path after a call to AddIncludePath.
//
function ResetIncludePath()
{
global $sSavePath,$bPathSaved;
if ($bPathSaved)
{
ini_set('include_path',$sSavePath);
$bPathSaved = false;
}
}
//
// Load a language file
//
function LoadLanguageFile()
{
global $aMessages,$sLangID,$sHTMLCharSet;
AddIncludePath();
if (!@include("language.inc.php"))
@include("language.inc");
ResetIncludePath();
if (isset($sHTMLCharSet) && $sHTMLCharSet !== "")
header("Content-Type: text/html; charset=$sHTMLCharSet");
}
//
// Load the messages array from the default language, and then
// override with an optional language file.
// Note: all messages get the MNUM parameter sent which they can use.
// If they don't use it, the message number is appended.
//
function LoadBuiltinLanguage()
{
global $aMessages,$sLangID;
$sLangID = "English (builtin)";
// MSG_SCRIPT_VERSION is shown if the PHP version is too old to run
// FormMail
// Parameters:
// $PHPREQ is the minimum required PHP version
// $PHPVERS is the version the server currently has installed.
$aMessages[MSG_SCRIPT_VERSION] = 'This script requires at least PHP version '.
'$PHPREQ. You have PHP version $PHPVERS.';
// MSG_END_VERS_CHK is sent at the end of an Alert message when
// FormMail detects that there's a newer version available
// Parameters: none
$aMessages[MSG_END_VERS_CHK] = '***************************************************\n'.
'If you are happy with your current version and want\n'.
'to stop these reminders, edit formmail.php and\n'.
'set CHECK_FOR_NEW_VERSION to false.\n'.
'***************************************************\n';
// MSG_VERS_CHK is sent in an Alert message when
// FormMail detects that there's a newer version available
// Parameters:
// $TECTITE the website to go to
// $FM_VERS the current FormMail version
// $NEWVERS the new FormMail version that's available
$aMessages[MSG_VERS_CHK] = 'A later version of FormMail is available from $TECTITE.\n'.
'You are currently using version $FM_VERS.\n'.
'The new version available is $NEWVERS.\n';
// MSG_CHK_FILE_ERROR is sent in an Alert message when
// FormMail cannot create a file to record the time of version check.
// Parameters:
// $FILE the file name that could not be created
// $ERROR the actual error message
$aMessages[MSG_CHK_FILE_ERROR] = 'Unable to create check file "$FILE": $ERROR';
// MSG_UNK_VALUE_SPEC is sent in an Alert message when
// a form uses an unknown value specification in derive_fields.
// Parameters:
// $SPEC the unknown value specification
// $MSG additional message
$aMessages[MSG_UNK_VALUE_SPEC] = 'derive_fields: unknown value specification '.
'"$SPEC"$MSG';
// MSG_INV_VALUE_SPEC is sent in an Alert message when
// a form uses a value specification in derive_fields that's
// formatted incorrectly (missing terminating '%')
// Parameters:
// $SPEC the invalid value specification
$aMessages[MSG_INV_VALUE_SPEC] = 'derive_fields: invalid value specification '.
'"$SPEC" (possibly missing a "%")';
// MSG_DERIVED_INVALID is sent in an Alert message when
// a form's derive_fields setting has errors
// Parameters: none
// A list of errors is appended on separate lines
$aMessages[MSG_DERIVED_INVALID] = 'Some derive_fields specifications are invalid $MNUM:\n';
// MSG_INT_FORM_ERROR is sent in an Alert message and displayed
// to the form user
// Parameters: none
$aMessages[MSG_INT_FORM_ERROR] = 'Internal form error';
// MSG_OPTIONS_INVALID is sent in an Alert message when
// a form's options settings are invalid. This applies to
// mail_options, filter_options, crm_options, and autorespond
// Parameters:
// $OPT the name of the options field
// A list of errors is appended on separate lines
$aMessages[MSG_OPTIONS_INVALID] = 'Some $OPT settings are undefined $MNUM:\n';
// MSG_PLSWAIT_REDIR is shown to the user for a redirect
// with JavaScript
// Parameters: none
$aMessages[MSG_PLSWAIT_REDIR] = 'Please wait while you are redirected...';
// MSG_IFNOT_REDIR is shown to the user for a redirect
// with JavaScript
// Parameters:
// $URL the URL to redirect to
$aMessages[MSG_IFNOT_REDIR] = 'If you are not automatically redirected, '.
'please click here.';
// MSG_PEAR_OBJ is shown to the user if the PEAR Mail object
// cannot be created
// Parameters: none
$aMessages[MSG_PEAR_OBJ] = 'Failed to create PEAR Mail object';
// MSG_PEAR_ERROR is sent in an Alert message if the PEAR Mail processing
// reports an error
// Parameters:
// $MSG the error message from PEAR
$aMessages[MSG_PEAR_ERROR] = 'PEAR Mail error: $MSG';
// MSG_NO_FOPT_ADDR is sent in an Alert message SendMailFOption is
// specified in the form and no email address has been provided
// Parameters: none
$aMessages[MSG_NO_FOPT_ADDR] = 'You have specified "SendMailFOption" in your '.
'form, but there is no email address to use';
// MSG_MORE_INFO is sent in an Alert message on a line by itself, just
// before extra information about the FormMail processing that may have
// led to the alert message
// Parameters: none
$aMessages[MSG_MORE_INFO] = 'More information:';
// MSG_INFO_STOPPED is sent in an Alert message to say that extra
// alert information has been suppressed because of potential security
// problems with showing it.
// Parameters: none
$aMessages[MSG_INFO_STOPPED] = '(Extra alert information suppressed for '.
'security purposes. $MNUM)';
// MSG_FM_ALERT is sent as the subject line of an Alert message
// Parameters: none
$aMessages[MSG_FM_ALERT] = 'FormMail alert';
// MSG_FM_ERROR is sent as the subject line of an Alert message
// Parameters: none
$aMessages[MSG_FM_ERROR] = 'FormMail script error';
// MSG_FM_ERROR_LINE is sent in an Alert message on a
// separate line to introduce the actual error message
// Parameters: none
$aMessages[MSG_FM_ERROR_LINE] = 'The following error occurred in FormMail $MNUM:';
// MSG_USERDATA_STOPPED is sent in an Alert message to say that the
// user's data has been suppressed because of potential security
// problems with showing it.
// Parameters: none
$aMessages[MSG_USERDATA_STOPPED] = '(User data suppressed for security '.
'purposes. $MNUM)';
// MSG_FILTERED is sent in an Alert message to show what filter
// has been used on the message
// Parameters:
// $FILTER the name of the filter
$aMessages[MSG_FILTERED] = 'This alert has been filtered through "$FILTER" '.
'for security purposes.';
// MSG_TEMPLATES is sent in an Alert message when a form tries
// to use a template, but templates have not been configured in
// formmail.php
// Parameters: none
$aMessages[MSG_TEMPLATES] = 'You must set either TEMPLATEDIR or TEMPLATEURL '.
'in formmail.php before you can specify '.
'templates in your forms.';
// MSG_OPEN_TEMPLATE is sent in an Alert message when FormMail cannot
// open a template file
// Parameters:
// $NAME the name of the template file
// $ERROR information about the error
$aMessages[MSG_OPEN_TEMPLATE] = 'Failed to open template "$NAME" $MNUM: $ERROR';
// MSG_ERROR_PROC is shown to the user as part of an error
// page. This message introduces the error.
// Parameters: none
$aMessages[MSG_ERROR_PROC] = 'An error occurred while processing the '.
'form $MNUM.\n\n';
// MSG_ALERT_DONE is shown to the user as part of an error
// page if an Alert message has been sent to the website owner.
// Parameters:
// SERVER the name of the server (website)
$aMessages[MSG_ALERT_DONE] = 'The staff at $SERVER have been alerted to the error $MNUM.\n';
// MSG_PLS_CONTACT is shown to the user as part of an error
// page if an Alert message could *not* be sent to the website owner.
// Parameters:
// SERVER the name of the server (website)
$aMessages[MSG_PLS_CONTACT] = 'Please contact us ($SERVER) directly since this form '.
'is not working $MNUM.\n';
// MSG_APOLOGY is shown to the user as part of an error
// page as an apology for a problem with the form.
// Parameters:
// SERVER the name of the server (website)
$aMessages[MSG_APOLOGY] = '$SERVER apologizes for any inconvenience this error '.
'may have caused.';
// MSG_ABOUT_FORMMAIL is shown to the user at the foot of pages
// generated by FormMail (e.g. the default "Thanks" page and default
// error page).
// Parameters:
// $FM_VERS the FormMail version number
// $TECTITE www.tectite.com
$aMessages[MSG_ABOUT_FORMMAIL] = 'Your form submission was processed by '.
'($FM_VERS), available from '.
'$TECTITE.';
// MSG_PREG_FAILED is sent in an Alert message if the TectiteCRM
// system failed to return the expected result.
// Parameters: none
$aMessages[MSG_PREG_FAILED] = 'preg_match_all failed in FindCRMFields';
// MSG_URL_INVALID is sent in an Alert message if the specified
// URL for TectiteCRM is not valid according to the TARGET_URLS
// configuration setting
// Parameters:
// $URL the invalid URL
$aMessages[MSG_URL_INVALID] = 'The URL "$URL" to access the Customer '.
'Relationship Management System is not valid '.
'(see TARGET_URLS in formmail.php)';
// MSG_URL_OPEN is sent in an Alert message if the specified
// URL for TectiteCRM cannot be opened
// Parameters:
// $URL the invalid URL
// $ERROR information about the error
$aMessages[MSG_URL_OPEN] = 'Failed to open Customer Relationship '.
'Management System URL "$URL" $MNUM: $ERROR';
// MSG_CRM_FAILED is sent in an Alert message if the TectiteCRM
// system doesn't return an OK message
// Parameters:
// $URL the invalid URL
// $MSG more information
$aMessages[MSG_CRM_FAILED] = 'Failure report from Customer Relationship '.
'Management System (url="$URL") $MNUM: $MSG';
// MSG_CRM_FORM_ERROR is shown to the user if the information
// passed to TectiteCRM was not accepted
// Parameters: none
$aMessages[MSG_CRM_FORM_ERROR] = 'Your form submission was not accepted';
// MSG_AND is shown to the user; it shows two items separated
// by "and"
// Parameters:
// $ITEM1 the first item
// $ITEM2 the second item
$aMessages[MSG_AND] = '"$ITEM1" and "$ITEM2"';
// MSG_OR is shown to the user; it shows two items separated
// by "or"
// Parameters:
// $ITEM1 the first item
// $ITEM2 the second item
$aMessages[MSG_OR] = '"$ITEM1" or "$ITEM2"';
// MSG_NOT_BOTH is shown to the user; it shows two items that must
// be specified together
// Parameters:
// $ITEM1 the first item
// $ITEM2 the second item
$aMessages[MSG_NOT_BOTH] = 'not both "$ITEM1" and "$ITEM2"';
// MSG_XOR is shown to the user; it shows two items that must
// not be specified together
// Parameters:
// $ITEM1 the first item
// $ITEM2 the second item
$aMessages[MSG_XOR] = '"$ITEM1" or "$ITEM2" (but not both)';
// MSG_IS_SAME_AS is shown to the user; it shows two items that must
// not be the same value
// Parameters:
// $ITEM1 the first item
// $ITEM2 the second item
$aMessages[MSG_IS_SAME_AS] = '"$ITEM1" is the same as "$ITEM2"';
// MSG_IS_NOT_SAME_AS is shown to the user; it shows two items that must
// be the same value
// Parameters:
// $ITEM1 the first item
// $ITEM2 the second item
$aMessages[MSG_IS_NOT_SAME_AS] = '"$ITEM1" is not the same as "$ITEM2"';
// MSG_REQD_OPER is sent in an Alert message when an unknown
// operator has been used in a "required" specification
// Parameters:
// $OPER the unknown operator
$aMessages[MSG_REQD_OPER] = 'Operator "$OPER" is not valid for "required"';
// MSG_PAT_FAILED is sent in an Alert message when a "conditions" pattern
// match has not matched anything (this isn't necessarily an error)
// Parameters:
// $OPER the "conditions" operator
// $PAT the "conditions" pattern
// $VALUE the value that was searched
$aMessages[MSG_PAT_FAILED] = 'Pattern operator "$OPER" failed: pattern '.
'"$PAT", value searched was "$VALUE".';
// MSG_COND_OPER is sent in an Alert message when a "conditions"
// operator is not value
// Parameters:
// $OPER the "conditions" operator
$aMessages[MSG_COND_OPER] = 'Operator "$OPER" is not valid for "conditions"';
// MSG_INV_COND is sent in an Alert message when a "conditions"
// field is not valid
// Parameters:
// FLD the field name
$aMessages[MSG_INV_COND] = 'Invalid "conditions" field "$FLD" - not a string or array.';
// MSG_COND_CHARS is sent in an Alert message when a "conditions"
// field is missing the mandatory first 2 characters (the separators)
// Parameters:
// FLD the field name
// COND the conditions field value
$aMessages[MSG_COND_CHARS] = 'The conditions field "$FLD" is not valid. '.
'You must provide the two separator '.
'characters at the beginning. You had "$COND".';
// MSG_COND_INVALID is sent in an Alert message when a "conditions"
// field has the wrong format
// Parameters:
// FLD the field name
// COND the conditions field value
// SEP the internal separator character for the field.
$aMessages[MSG_COND_INVALID] = 'The conditions field "$FLD" is not valid. '.
'There must be at least 5 components '.
'separated by "$SEP". Your value was "$COND".';
// MSG_COND_TEST_LONG is sent in an Alert message when a "conditions"
// TEST value has too many components
// Parameters:
// FLD the field name
// COND the conditions field value
// SEP the list separator character for the field.
$aMessages[MSG_COND_TEST_LONG] = 'Field "$FLD" has too many components for '.
'a "TEST" command: "$COND".\nAre you missing '.
'a "$SEP"?';
// MSG_COND_IF_SHORT is sent in an Alert message when a "conditions"
// IF value has too few components
// Parameters:
// FLD the field name
// COND the conditions field value
// SEP the internal separator character for the field.
$aMessages[MSG_COND_IF_SHORT] = 'Field "$FLD" has too few components for '.
'an "IF" command: "$COND".\nThere must be '.
'at least 6 components separated by "$SEP"';
// MSG_COND_IF_LONG is sent in an Alert message when a "conditions"
// IF value has too many components
// Parameters:
// FLD the field name
// COND the conditions field value
// SEP the list separator character for the field.
$aMessages[MSG_COND_IF_LONG] = 'Field "$FLD" has too many components for '.
'an "IF" command: "$COND".\nAre you missing '.
'a "$SEP"?';
// MSG_COND_UNK is sent in an Alert message when a "conditions"
// value has an unknown command
// Parameters:
// FLD the field name
// COND the conditions field value
// CMD the unknown command
$aMessages[MSG_COND_UNK] = 'Field "$FLD" has an unknown command word '.
'"$CMD": "$COND".';
// MSG_MISSING is sent in an Alert message when
// a socket filter is incorrectly defined
// Parameters:
// ITEM the missing item
$aMessages[MSG_MISSING] = 'Missing "$ITEM"';
// MSG_NEED_ARRAY is sent in an Alert message when
// a socket filter is incorrectly defined
// Parameters:
// ITEM the item that should be an array
$aMessages[MSG_NEED_ARRAY] = '"$ITEM" must be an array';
// MSG_SUBM_FAILED is shown to the user when an internal error
// as occurred and that error is not to be shown
// Parameters: none
$aMessages[MSG_SUBM_FAILED] = 'Your form submission has failed due to '.
'an error on our server.';
// MSG_FILTER_WRONG is sent in an Alert message when
// a socket filter is incorrectly defined
// Parameters:
// FILTER the filter name
// ERRORS a string containing a list of errors
$aMessages[MSG_FILTER_WRONG] = 'Filter "$FILTER" is not properly defined: '.
'$ERRORS';
// MSG_FILTER_CONNECT is sent in an Alert message when FormMail
// cannot connect to a socket filter
// Parameters:
// FILTER the filter name
// SITE the site
// ERRNUM socket error number
// ERRSTR socket error message
$aMessages[MSG_FILTER_CONNECT] = 'Could not connect to site "$SITE" '.
'for filter "$FILTER" ($ERRNUM): $ERRSTR';
// MSG_FILTER_PARAM is sent in an Alert message when a socket
// filter has an invalid parameter specification
// Parameters:
// FILTER the filter name
// NUM parameter number
// NAME parameter name
$aMessages[MSG_FILTER_PARAM] = 'Filter "$FILTER" has invalid parameter '.
'#$NUM: no "$NAME"';
// MSG_FILTER_OPEN_FILE is sent in an Alert message when a socket
// filter cannot open the required file
// Parameters:
// FILTER the filter name
// FILE the file that could not be opened
// ERROR the error message
$aMessages[MSG_FILTER_OPEN_FILE] = 'Filter "$FILTER" cannot open file '.
'"$FILE": $ERROR';
// MSG_FILTER_FILE_ERROR is sent in an Alert message when a socket
// filter gets an error message during reading a file
// Parameters:
// FILTER the filter name
// FILE the file that could not be opened
// ERROR the error message
// NLINES the number of lines that were read successfully
$aMessages[MSG_FILTER_FILE_ERROR] = 'Filter "$FILTER": read error on file '.
'"$FILE" after $NLINES lines: $ERROR';
// MSG_FILTER_READ_ERROR is sent in an Alert message when a socket
// filter gets an error during reading from the socket
// Parameters:
// FILTER the filter name
// ERROR the error message
$aMessages[MSG_FILTER_READ_ERROR] = 'Filter "$FILTER" failed: read error: '.
'$ERROR';
// MSG_FILTER_NOT_OK is sent in an Alert message when a socket
// filter fails to return the agreed __OK__ indicator
// Parameters:
// FILTER the filter name
// DATA the data returned from the filter
$aMessages[MSG_FILTER_NOT_OK] = 'Filter "$FILTER" failed (missing '.
'__OK__ line): $DATA';
// MSG_FILTER_UNK is sent in an Alert message
// when an unknown filter is specified by a form
// Parameters:
// FILTER the filter name
$aMessages[MSG_FILTER_UNK] = 'Unknown filter "$FILTER"';
// MSG_FILTER_CHDIR is sent in an Alert message
// when FormMail cannot change to the filter's directory
// Parameters:
// FILTER the filter name
// DIR the directory name
// ERROR an error message from the system
$aMessages[MSG_FILTER_CHDIR] = 'Cannot chdir to "$DIR" to run filter '.
'"$FILTER": $ERROR';
// MSG_FILTER_NOTFOUND is sent in an Alert message
// when FormMail cannot execute the filter
// Parameters:
// FILTER the filter name
// CMD the command line being executed
// ERROR an error message from the system
$aMessages[MSG_FILTER_NOTFOUND] = 'Cannot execute filter "$FILTER" with '.
'command "$CMD": $ERROR';
// MSG_FILTER_ERROR is sent in an Alert message
// when a filter returns a non-zero status
// Parameters:
// FILTER the filter name
// ERROR an error message from the system
// STATUS the status return from the command
$aMessages[MSG_FILTER_ERROR] = 'Filter "$FILTER" failed (status $STATUS): '.
'$ERROR';
// MSG_TEMPLATE_ERRORS is sent as part of an Alert message
// when a template has generated some errors. The message
// should end with a new line and the actual errors are
// output after it.
// Parameters:
// NAME the template name
$aMessages[MSG_TEMPLATE_ERRORS] = 'Template "$NAME" caused the '.
'following errors $MNUM:\n';
// MSG_TEMPLATE_FAILED is sent in an Alert message
// when processing a template has failed.
// Parameters:
// NAME the template name
$aMessages[MSG_TEMPLATE_FAILED] = 'Failed to process template "$NAME"';
// MSG_MIME_PREAMBLE is sent in the preamble of MIME emails
// Parameters: none
$aMessages[MSG_MIME_PREAMBLE] = '(Your mail reader should not show this '.
'text.\nIf it does you may need to '.
'upgrade to more modern software.)';
// MSG_MIME_HTML is sent in the preamble of HTML emails
// Parameters:
// NAME the template name
$aMessages[MSG_MIME_HTML] = 'This message has been generated by FormMail '.
'using an HTML template\ncalled "$NAME". The '.
'raw text of the form results\nhas been '.
'included below, but your mail reader should '.
'display the HTML\nversion only (unless it\'s '.
'not capable of doing so).';
// MSG_FILE_OPEN_ERROR is sent in an Alert message when FormMail
// cannot open a file
// Parameters:
// NAME the file name
// TYPE the type of file
// ERROR the system error message
$aMessages[MSG_FILE_OPEN_ERROR] = 'Failed to open $TYPE file "$NAME": $ERROR';
// MSG_ATTACH_DATA is sent in an Alert message when the file
// attachment through 'data' has gone wrong.
// Parameters: none
$aMessages[MSG_ATTACH_DATA] = 'Internal error: AttachFile requires '.
'"tmp_name" or "data"';
// MSG_PHP_HTML_TEMPLATES is sent in an Alert message when an
// HTML template is used but the PHP version is too old.
// Parameters:
// $PHPVERS the current PHP version
$aMessages[MSG_PHP_HTML_TEMPLATES] = 'HTMLTemplate option is only supported '.
'with PHP version 4.0.5 or above. Your '.
'server is running version $PHPVERS.';
// MSG_PHP_FILE_UPLOADS is sent in an Alert message when
// file upload is used but the PHP version is too old.
// Parameters:
// $PHPVERS the current PHP version
$aMessages[MSG_PHP_FILE_UPLOADS] = 'For security reasons, file upload is only '.
'allowed with PHP version 4.0.3 or above. '.
'Your server is running version $PHPVERS.';
// MSG_FILE_UPLOAD is sent in an Alert message when
// file upload is attempted but FormMail is not configured to allow
// it
// Parameters: none
$aMessages[MSG_FILE_UPLOAD] = 'File upload attempt ignored';
// MSG_FILE_UPLOAD_ATTACK is sent in an Alert message when
// possible file upload attack is detected
// Parameters:
// NAME file name
// TEMP temporary file name
// FLD name of the file upload field
$aMessages[MSG_FILE_UPLOAD_ATTACK] = 'Possible file upload attack '.
'detected: field="$FLD", name="$NAME" '.
'temp name="$TEMP"';
// MSG_PHP_PLAIN_TEMPLATES is sent in an Alert message when a
// Plain template is used but the PHP version is too old.
// Parameters:
// $PHPVERS the current PHP version
$aMessages[MSG_PHP_PLAIN_TEMPLATES] = 'PlainTemplate option is only supported '.
'with PHP version 4.0.5 or above. Your '.
'server is running version $PHPVERS.';
// MSG_ATTACH_NAME is sent in an Alert message when a
// the form uses the Attach feature without specifying a file name
// Parameters: none
$aMessages[MSG_ATTACH_NAME] = 'filter_options: Attach must contain a name '.
'(e.g. Attach=data.txt)';
// MSG_PHP_BCC is sent in an Alert message when a
// the form uses the BCC feature and the PHP version may not support it
// Parameters:
// $PHPVERS the current PHP version
$aMessages[MSG_PHP_BCC] = 'Warning: BCC is probably not supported on your '.
'PHP version ($PHPVERS)';
// MSG_CSVCOLUMNS is sent in an Alert message when a csvcolumns field
// is not correct
// Parameters:
// $VALUE the csvcolumns field value
$aMessages[MSG_CSVCOLUMNS] = 'The "csvcolumns" setting is not '.
'valid: "$VALUE"';
// MSG_CSVFILE is sent in an Alert message when a csvfile field
// is not correct
// Parameters:
// $VALUE the csvfile field value
$aMessages[MSG_CSVFILE] = 'The "csvfile" setting is not valid: "$VALUE"';
// MSG_TARG_EMAIL_PAT_START is sent in an Alert message when a
// $TARGET_EMAIL pattern is insecure because of a missing '^'
// at the beginning
// Parameters:
// $PAT the pattern
$aMessages[MSG_TARG_EMAIL_PAT_START] = 'Warning: Your TARGET_EMAIL pattern '.
'"$PAT" is missing a ^ at the '.
'beginning.';
// MSG_TARG_EMAIL_PAT_END is sent in an Alert message when a
// $TARGET_EMAIL pattern is insecure because of a missing '$'
// at the end
// Parameters:
// $PAT the pattern
$aMessages[MSG_TARG_EMAIL_PAT_END] = 'Warning: Your TARGET_EMAIL pattern '.
'"$PAT" is missing a $ at the end.';
// MSG_CONFIG_WARN is sent in an Alert message when the FormMail
// configuration may have some problems. The messages are
// passed on separate lines, so the line terminations below
// are important.
// Parameters:
// $MESGS lines of messages
$aMessages[MSG_CONFIG_WARN] = 'The following potential problems were found '.
'in your configuration:\n$MESGS\n\n'.
'These are not necessarily errors, but you '.
'should review the documentation\n'.
'inside formmail.php. If you are sure your '.
'configuration is correct\n'.
'you can disable the above messages by '.
'changing the CONFIG_CHECK settings.';
// MSG_PHP_AUTORESP is sent in an Alert message when the PHP version
// does not support autoresponding
// Parameters:
// $PHPVERS current PHP version
$aMessages[MSG_PHP_AUTORESP] = 'Autorespond is only supported with PHP '.
'version 4.0.5 or above. Your server is '.
'running version $PHPVERS.';
// MSG_ALERT is the test alert message (formmail.php?testalert=1)
// Parameters:
// $LANG the language ID
// $PHPVERS PHP version
// $FM_VERS FormMail version
// $SERVER server type
// $DOCUMENT_ROOT PHP's DOCUMENT_ROOT value
// $SCRIPT_FILENAME PHP's SCRIPT_FILENAME value
// $PATH_TRANSLATED PHP's PATH_TRANSLATED value
// $REAL_DOCUMENT_ROOT the REAL_DOCUMENT_ROOT value
$aMessages[MSG_ALERT] = 'This is a test alert message $MNUM\n'.
'Loaded language is $LANG\n'.
'PHP version is $PHPVERS\n'.
'FormMail version is $FM_VERS\n'.
'Server type: $SERVER\n'.
'\n'.
'DOCUMENT_ROOT: $DOCUMENT_ROOT\n'.
'SCRIPT_FILENAME: $SCRIPT_FILENAME\n'.
'PATH_TRANSLATED: $PATH_TRANSLATED\n'.
'REAL_DOCUMENT_ROOT: $REAL_DOCUMENT_ROOT';
// MSG_NO_DEF_ALERT is displayed if you use the testalert feature
// and no DEF_ALERT setting has been provided.
// Parameters: none
$aMessages[MSG_NO_DEF_ALERT] = 'No DEF_ALERT value has been set.';
// MSG_TEST_SENT is displayed if when use the testalert feature
// Parameters: none
$aMessages[MSG_TEST_SENT] = 'Test message sent. Check your email.';
// MSG_TEST_FAILED is displayed if when use the testalert feature
// and the mail sending fails.
// Parameters: none
$aMessages[MSG_TEST_FAILED] = 'FAILED to send alert message. Check your '.
'server error logs.';
// MSG_NO_DATA_PAGE is the page that's displayed if the user
// just opens the URL to FormMail directly.
// Parameters: none
$aMessages[MSG_NO_DATA_PAGE] = 'This URL is a Form submission program.\n'.
'It appears the form is not working '.
'correctly as there was no data found.\n'.
'You\'re not supposed to browse to this '.
'URL; it should be accessed from a form.';
// MSG_REQD_ERROR is displayed to the user as a default error
// message when they haven't supplied some required fields
// Parameters: none
$aMessages[MSG_REQD_ERROR] = 'The form required some values that you '.
'did not seem to provide.';
// MSG_COND_ERROR is displayed to the user as a default error
// message when some form conditions have failed
// Parameters: none
$aMessages[MSG_COND_ERROR] = 'Some of the values you provided are not valid.';
// MSG_CRM_FAILURE is displayed to the user when submission
// to the CRM has failed.
// Parameters:
// $URL the URL that was used
// $DATA data returned from the CRM
$aMessages[MSG_CRM_FAILURE] = 'The form submission did not succeed due to '.
'a CRM failure. URL was \'$URL\'. '.
'Returned CRM data:\n$DATA';
// MSG_FOPTION_WARN is sent in an Alert message when the form
// uses the superseded SendMailFOption feature
// Parameters:
// $LINE line number for SENDMAIL_F_OPTION
$aMessages[MSG_FOPTION_WARN] = 'Warning: You\'ve used SendMailFOption in '.
'"mail_options" in your form. This has been '.
'superseded with a configuration setting '.
'inside formmail.php. Please update your '.
'formmail.php configuration (look for '.
'SENDMAIL_F_OPTION on line $LINE) and set '.
'it to "true", then remove SendMailFOption '.
'from your form(s).';
// MSG_NO_ACTIONS is sent in an Alert message when there is no
// action to perform or email address to send to
// Parameters: none
$aMessages[MSG_NO_ACTIONS] = 'The form has an internal error - no actions '.
'or recipients were specified.';
// MSG_NO_RECIP is sent in an Alert message when there are no
// valid recipients to send to
// Parameters: none
$aMessages[MSG_NO_RECIP] = 'The form has an internal error - no valid '.
'recipients were specified.';
// MSG_INV_EMAIL is sent in an Alert message when there are errors
// in the email addresses specified in the form
// Parameters:
// $ERRORS list of errors
$aMessages[MSG_INV_EMAIL] = 'Invalid email addresses were specified '.
'in the form $MNUM:\n$ERRORS';
// MSG_FAILED_SEND is sent in an Alert message when the mail sending fails.
// Parameters: none
$aMessages[MSG_FAILED_SEND] = 'Failed to send email';
// MSG_ARESP_EMAIL is sent in an Alert message when
// no email address has been specified for an autoreponse
// Parameters: none
$aMessages[MSG_ARESP_EMAIL] = 'No "email" field was found. Autorespond '.
'requires the submitter\'s email address.';
// MSG_ARESP_SUBJ is the default subject for the auto response email
// Parameters: none
$aMessages[MSG_ARESP_SUBJ] = 'Your form submission';
// MSG_LOG_NO_VERIMG is written to the auto respond log file
// if no VerifyImgString session variable was found
// Parameters: none
$aMessages[MSG_LOG_NO_VERIMG] = 'No VerifyImgString in session';
// MSG_ARESP_NO_AUTH is shown to the user
// if no VerifyImgString session variable was found
// Parameters: none
$aMessages[MSG_ARESP_NO_AUTH] = 'Failed to obtain authorization to send '.
'you email. This is probably a fault on '.
'the server.';
// MSG_LOG_NO_MATCH is written to the auto respond log file
// if the user's entry did not match the image verification
// Parameters: none
$aMessages[MSG_LOG_NO_MATCH] = 'User did not match image';
// MSG_ARESP_NO_MATCH is shown to the user
// if the user's entry did not match the image verification
// Parameters: none
$aMessages[MSG_ARESP_NO_MATCH] = 'Your entry did not match the image';
// MSG_LOG_FAILED is written to the auto respond log file
// if the autoresponding failed
// Parameters: none
$aMessages[MSG_LOG_FAILED] = 'Failed';
// MSG_ARESP_FAILED is sent in an Alert message
// if the autoresponding failed
// Parameters: none
$aMessages[MSG_ARESP_FAILED] = 'Autoresponder failed';
// MSG_LOG_OK is written to the auto respond log file
// if the autoresponding succeeded
// Parameters: none
$aMessages[MSG_LOG_OK] = 'OK';
// MSG_THANKS_PAGE is the default page that's displayed if the
// submission is successful
// Parameters: none
$aMessages[MSG_THANKS_PAGE] = 'Thanks! We\'ve received your information '.
'and, if it\'s appropriate, we\'ll be in '.
'contact with you soon.';
// MSG_LOAD_MODULE is sent in an alert message if a module
// could not be loaded.
// Parameters:
// $FILE the file name
// $ERROR the error message
$aMessages[MSG_LOAD_MODULE] = 'Cannot load module from file \'$FILE\': $ERROR';
// MSG_LOAD_FMCOMPUTE is sent in an alert message if the form
// specifies at least one "fmcompute" field and the FMCompute
// module cannot be loaded.
// Parameters:
// $FILE the file name
// $ERROR the error message
$aMessages[MSG_LOAD_FMCOMPUTE] = 'Cannot load FMCompute module from file '.
'\'$FILE\': $ERROR';
// MSG_REGISTER_MODULE is sent in an alert message if a module
// could not register with FMCompute
// Parameters:
// $NAME the name of the module
// $ERROR the error message
$aMessages[MSG_REGISTER_MODULE] = 'Cannot register module $NAME with '.
'FMCompute: $ERROR';
// MSG_COMP_PARSE is sent in an alert message if a parse error
// occurs in an fmcompute field
// Parameters:
// $CODE the code with an error
// $ERRORS the error messages
$aMessages[MSG_COMP_PARSE] = 'These parse errors occurred in the following '.
'code:\n$ERRORS\n$CODE';
// MSG_COMP_REG_DATA is sent in an alert message if FormMail cannot
// register a data field with the FMCompute module
// Parameters:
// $NAME the field name
// $ERROR the error message
$aMessages[MSG_COMP_REG_DATA] = 'Failed to register data field \'$NAME\': '.
'$ERROR';
// MSG_COMP_ALERT is sent in an alert message if the FMCompute
// module has generated some alert messages.
// Parameters:
// $ALERTS the alerts
$aMessages[MSG_COMP_ALERT] = 'The following alert messages were reported '.
'from the FMCompute module: $ALERTS';
// MSG_COMP_DEBUG is sent in an alert message if the FMCompute
// module has generated some debug messages.
// Parameters:
// $DEBUG the alerts
$aMessages[MSG_COMP_DEBUG] = 'The following debug messages were reported '.
'from the FMCompute module: $DEBUG';
// MSG_COMP_EXEC is sent in an alert message if the FMCompute
// module has generated some error messages during execution
// Parameters:
// $ERRORS the errors
$aMessages[MSG_COMP_EXEC] = 'The following error messages were reported '.
'from the FMCompute module: $ERRORS';
// MSG_TEMPL_ALERT is sent in an alert message if Advanced Template
// Processing has generated some alert messages.
// Parameters:
// $ALERTS the alerts
$aMessages[MSG_TEMPL_ALERT] = 'The following alert messages were reported '.
'from the Advanced Template Processor: $ALERTS';
// MSG_TEMPL_DEBUG is sent in an alert message if Advanced Template
// Processing has generated some debug messages.
// Parameters:
// $DEBUG the alerts
$aMessages[MSG_TEMPL_DEBUG] = 'The following debug messages were reported '.
'from the Advanced Template Processor: $DEBUG';
// MSG_TEMPL_PROC is sent in an alert message if Advanced Template Processing
// has generated some error messages during processing
// Parameters:
// $ERRORS the errors
$aMessages[MSG_TEMPL_PROC] = 'The following error messages were reported '.
'from the Advanced Template Processor: $ERRORS';
// MSG_REG_FMCOMPUTE is sent in an Alert message when FormMail
// cannot register an external function with FMCompute.
// Parameters:
// FUNC the function that could not be registered
// ERROR the error message
$aMessages[MSG_REG_FMCOMPUTE] = 'Cannot register function "$FUNC" with '.
'FMCompute: $ERROR';
// MSG_USER_ERRORS is shown as part of a user error when an FMCompute
// has called the "UserError" function one or more times.
// Parameters:
// NONE
$aMessages[MSG_USER_ERRORS] = 'One or more errors occurred in your form submission';
// MSG_CALL_PARAM_COUNT is sent in an alert when a call to a FormMail
// function from FMCompute has the wrong number of parameters
// Parameters:
// FUNC the function name
// COUNT the actual number of parameters passed
$aMessages[MSG_CALL_PARAM_COUNT] = 'FMCompute called FormMail function '.
'\'$FUNC\' with wrong number of '.
'parameters: $COUNT';
// MSG_CALL_UNK_FUNC is sent in an alert when FMCompute calls an
// unknown FormMail function
// Parameters:
// FUNC the function name
$aMessages[MSG_CALL_UNK_FUNC] = 'FMCompute called unknown FormMail function '.
'\'$FUNC\'';
// MSG_SAVE_FILE is sent in an alert when saving a file to
// the server has failed
// Parameters:
// FILE the source file name (usually a temporary file name)
// DEST the destination file name
// ERR the error message
$aMessages[MSG_SAVE_FILE] = 'Failed to save file \'$FILE\' to \'$DEST\': $ERR';
// MSG_SAVE_FILE_EXISTS is sent as part of an alert when saving a file to
// the repository ($FILE_REPOSITORY) has failed because the file
// already exists and FILE_OVERWRITE is set to false.
// Parameters:
// FILE the destination file name
$aMessages[MSG_SAVE_FILE_EXISTS] = 'Cannot save file to repository as this would '.
'overwrite \'$FILE\' and you have '.
'set FILE_OVERWRITE to false.';
// MSG_EMPTY_ADDRESSES is sent as part of an alert when a number of empty
// email addresses have been specified in recipients, cc, or bcc
// *and* there are no valid addresses provided
// in the list
// Parameters:
// COUNT the number of empty addresses
$aMessages[MSG_EMPTY_ADDRESSES] = '$COUNT empty addresses';
// MSG_CALL_INVALID_PARAM is sent in an alert when a call to a FormMail
// function from FMCompute has an invalid parameter
// Parameters:
// FUNC the function name
// PARAM the parameter number
// CORRECT information about correct values
$aMessages[MSG_CALL_INVALID_PARAM] = 'FMCompute called FormMail function '.
'\'$FUNC\' with an invalid parameter '.
'number $PARAM. Correct values are: $CORRECT';
// MSG_CHMOD is sent in an alert when changing the protection
// mode of a file to has failed
// Parameters:
// FILE the file name
// MODE the mode
// ERR the error message
$aMessages[MSG_CHMOD] = 'Failed to change protection mode of file \'$FILE\' '.
'to $MODE: $ERR';
// MSG_VERIFY_MISSING is shown to the user image verification string
// was not found
// Parameters: none
$aMessages[MSG_VERIFY_MISSING] = 'Image verification string missing. This'.
' is probably a fault on the server.';
// MSG_VERIFY_MATCH is shown to the user
// if the user's entry did not match the image verification for the
// imgverify option
// Parameters: none
$aMessages[MSG_VERIFY_MATCH] = 'Your entry did not match the image';
// MSG_FILE_NAMES_INVALID is sent in an Alert message when
// a form's file_names setting has errors
// Parameters: none
// A list of errors is appended on separate lines
$aMessages[MSG_FILE_NAMES_INVALID] = 'Some file_names specifications are invalid $MNUM:\n';
// MSG_FILE_NAMES_NOT_FILE is sent in an Alert message when
// a form's file_names setting refers to a file field that doesn't
// exist
// Parameters:
// NAME the name of the file field that doesn't exist
$aMessages[MSG_FILE_NAMES_NOT_FILE] = 'Your file_names specification has '.
'an error. \'$NAME\' is not the name '.
'of a file upload field\n';
// MSG_NEXT_PLUS_GOOD is sent in an alert message if the form is
// ambiguous and specifies both "next_form" and "good_url" or
// "good_template"
// Parameters:
// $WHICH the "good_" field that was specified
$aMessages[MSG_NEXT_PLUS_GOOD] = 'The form has specified both "next_form" '.
'and "$WHICH" fields - the action to '.
'to perform is ambiguous';
// MSG_MULTIFORM is sent in an Alert message when a form tries
// to use a multi-form template, but templates have not been configured in
// formmail.php
// Parameters: none
$aMessages[MSG_MULTIFORM] = 'You must set either MULTIFORMDIR or MULTIFORMURL '.
'in formmail.php before you can use '.
'multi-page forms.';
// MSG_MULTIFORM_FAILED is sent in an Alert message
// when processing a multi-page form template has failed.
// Parameters:
// NAME the template name
$aMessages[MSG_MULTIFORM_FAILED] = 'Failed to process multi-page form template "$NAME"';
// MSG_NEED_THIS_FORM is sent in an Alert message
// when a multi-page form does not specify the "this_form" field.
// Parameters:
// none
$aMessages[MSG_NEED_THIS_FORM] = 'Multi-page forms require "this_form" field';
// MSG_NO_PHP_SELF is sent in an Alert message
// when FormMail requires the "PHP_SELF" server variable and PHP is not
// providing it.
// Parameters:
// none
$aMessages[MSG_NO_PHP_SELF] = 'PHP on the server is not providing "PHP_SELF"';
// MSG_RETURN_URL_INVALID is sent in an Alert message
// when "this_form" is not a valid return URL. This occurs for
// multi-page forms.
// Parameters:
// URL the invalid URL
$aMessages[MSG_RETURN_URL_INVALID] = 'Return URL "$URL" is not valid';
// MSG_GO_BACK is sent in an Alert message
// when "multi_go_back" has been submitted but this isn't part of a
// multi-page form.
// Parameters:
// none
$aMessages[MSG_GO_BACK] = 'Cannot "go back" if not in a multi-page form '.
'sequence or at the first page of the form '.
'sequence';
// MSG_OPEN_URL is sent in an Alert message when a URL cannot
// be opened.
// Parameters:
// URL the invalid URL
// ERROR error message
$aMessages[MSG_OPEN_URL] = 'Cannot open URL "$URL": $ERROR';
// MSG_CANNOT_RETURN is sent in an Alert message when an invalid return
// request is made in a multi-page form sequence.
// Parameters:
// TO the requested page index
// TOPINDEX the top page index
$aMessages[MSG_CANNOT_RETURN] = 'Cannot return to page $TO. The top page '.
'index is $TOPINDEX';
// MSG_ATTACK_DETECTED is sent in an Alert message when an attack on
// the server has been detected
// Parameters:
// ATTACK name or description of the attack
// INFO more information about the attack
$aMessages[MSG_ATTACK_DETECTED] = 'Server attack "$ATTACK" detected. '.
'Your server is safe as FormMail is '.
'invulnerable to this attack. You can '.
'disable these messages by setting '.
'ALERT_ON_ATTACK_DETECTION to false '.
'in FormMail\'s configuration section.'.
'\nMore information:\n$INFO';
// MSG_ATTACK_PAGE is the contents of the browser page displayed to the
// user when an attack is detected
// Parameters:
// SERVER the name of the server (website)
// USERINFO details of the error
$aMessages[MSG_ATTACK_PAGE] = 'Your form submission has been rejected '.
'as it appears to be an abuse of our server ('.
'$SERVER). '.
'Our supplier of forms processing software has '.
'provided more information about this error.