I get an error when I try testing the FormMail from tectite.com.
The instructions say:
- 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).
- 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.
- 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."^[email protected]$"");
/* 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,AUTH_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=“[email protected]” />
<!-- STEP 3: Specify required fields in the ‘required’ value -->
<input type=“hidden” name=“required” value=“email: [email protected],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