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

//Check that post data exists

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

$formtype=escape_data($_POST[‘form_type’],30,’string’);
$fromnam=escape_data($_POST[‘name’],30,’string’);
$organization=escape_data($_POST[‘organization’],30,’string’);
$phone=escape_data($_POST[‘phone’],30,’string’);
$address=escape_data($_POST[‘address’],30,’string’);
$city=escape_data($_POST[‘city’],30,’string’);
$province=escape_data($_POST[‘province’],30,’string’);
$postalcode=escape_data($_POST[‘postalcode’],30,’string’);
$fromadd=escape_data($_POST[’email’],30,’string’);

//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
“;

//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 “

Thank you for your interest in joining the OCAA.”;
echo(‘ Please email contact@cleanairalliance.org with any questions.

‘);

} else {
echo “

No membership information submitted. Join now.

“;
}

?>