$headers .= “From: \””.$fromname.”\” <".$fromaddress.">\n”;
return mail($toaddress, $subject, $message, $headers);

//Check simple captcha answer
$Answer = $_SESSION[‘CustomCaptchaAnswer’];
$CaptchaCorrect = ( escape_data($_POST[‘answer’],5,’string’) == $Answer) ? true : false;

//Check that post data exists and answer to Captcha is correct

if ( (!empty($_POST[‘name’])) && $CaptchaCorrect ) {


//Create Body of message
$BodyText = “FORM: $formtype
\r\nNAME: $fromnam
\r\nORGANIZATION: $organization
\r\nPHONE: $phone
\r\nADDRESS: $address
\r\nCITY: $city
\r\nPROVINCE: $province
\r\nPOSTAL CODE: $postalcode
\r\nEMAIL: $fromadd
\r\nADD TO ELIST: $elist

\r\n WYNNE PAMPHLETS: $BrochureWynne
\r\n STOP PAMPHLETS: $BrochureStop



\r\n COAL IS COSTING US THE AIR WE BREATHE! (McGuinty,Hudak): {$_POST[‘Brochure-Coal-Costing-Hudak’]}
\r\n COAL IS COSTING US THE AIR WE BREATHE! (McGuinty,Horwath): {$_POST[‘Brochure-Coal-Costing-Horwath’]}

\r\nKNOCKOUT COAL PAMPHLETS: {$_POST[‘Brochure2-knockout’]}
\r\nCOAL EXPORT PAMPHLETS: {$_POST[‘Brochure3-export’]}
\r\nTOWERS OF POWER PAMPHLETS: {$_POST[‘Brochure4-towers’]}
\r\nNUCLEAR MONOPOLY PAMPHLETS: {$_POST[‘Brochure5-nuclear’]}
\r\nTOO BIG TOO COSTLY PAMPHLETS: {$_POST[‘Brochure-Too-big’]}
\r\nPLACES OF POWER PAMPHLETS: {$_POST[‘Brochure-Places-of-power’]}


//$BodyText = strip_tags($BodyText);

//echo $BodyText;

//Send message
//mail($RecipientEmail,”OCAA SITE FORM: {$_POST[‘form_type’]}”,$BodyText,”From: {$_POST[’email’]}”);
MAIL_NVLP($fromnam,$fromadd,’OCAA Form Submission’,$RecipientEmail,”OCAA SITE FORM: $formtype”,$BodyText);

//Write thank you message

echo ‘

Thanks for ordering our pamphlets. You are helping to lead Ontario toward a green future. You can help even more by making a donation to help cover the costs of printing and shipping these pamphlets all across the province. Any amount you can give will help us to distribute more pamphlets and raise awareness. Click here to make a secure contribution right now.


You will receive the requested items shortly.

Please email contact@cleanairalliance.org with any questions.


} else {
echo “

There was an error with your form submission. Please hit the back button or go to the order page to try again.