I get an error when I try testing the FormMail from tectite.com.
The instructions say:
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:
* 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
What I've done is the following:
$TARGET_EMAIL = array(EMAIL_NAME."^myName@myDomainName\.com\.au$"" );
/* Help: http://www.tectite.com/fmdoc/def_alert.php */
I uploaded the PHP file on my website server in a folder: /formtest/formmail.php
As suggested I added the hidden field in my form code:
<form method="post" action="http://myDomainName.com.au/formtest/formmail.php" name="SampleForm">
<input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUT H_TYPE,REMOTE_USER" />
<!-- STEP 2: Put your email address in the 'recipients' value. Note that you also have to allow this email address in the $TARGET_EMAIL setting within formmail.php! -->
<input type="hidden" name="recipients" value="myName@myDomainName.com.au" />
<!-- STEP 3: Specify required fields in the 'required' value -->
<input type="hidden" name="required" value="email: myName@myDomainName.com.au,realname:myName" />
<!-- STEP 4: Put your subject line in the 'subject' value. -->
<input type="hidden" name="subject" value="Sample FormMail Testing" />
However after uploading the html and php and and try testing it, i get the following error?
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/myDomain/public_html/formtest/formmail.php on line 253