validRequest($cf_code)) { $obj->destroy(); } else { $prob["code2"] = true; } } // CAPTCHA SECURITY END if (!$prob) { require("ssi/class.phpmailer.php"); //send email $cfmail = new phpmailer(); $cfmail->From = "$cf_email"; $cfmail->FromName = "$cf_name"; $cfmail->Subject = "$websitetitle - Contact Form - ".$cf_epurpose; $textemail = file_get_contents("admin/templates/contactformemail.txt"); $textemail = str_replace("!!!NAME!!!", $cf_name, $textemail); $textemail = str_replace("!!!COMPANY!!!", $cf_company, $textemail); $textemail = str_replace("!!!POSITION!!!", $cf_position, $textemail); $textemail = str_replace("!!!ADDRESS1!!!", $cf_address1, $textemail); $textemail = str_replace("!!!ADDRESS2!!!", $cf_address2, $textemail); $textemail = str_replace("!!!TOWN!!!", $cf_town, $textemail); $textemail = str_replace("!!!STATE!!!", $cf_state, $textemail); $textemail = str_replace("!!!COUNTRY!!!", $cf_country, $textemail); $textemail = str_replace("!!!TEL!!!", $cf_tel, $textemail); $textemail = str_replace("!!!MOBILE!!!", $cf_mobile, $textemail); $textemail = str_replace("!!!EMAIL!!!", $cf_email, $textemail); $textemail = str_replace("!!!HEAR!!!", $cf_hear, $textemail); $textemail = str_replace("!!!QUERY!!!", $cf_query, $textemail); $cfmail->IsHTML(false); $cfmail->Body = $textemail; $cfmail->AddAddress($owner_email, $websitetitle); // $cfmail->AddAddress("info@nmsdesigns.com", "Test Email"); if(!$cfmail->Send()) { $prob["mail"] = true; } else $sentok = true; } } else { if ($_GET["cfsubject"]) $cf_subject = $_GET["cfsubject"]; if($_SESSION["uid"]) { $cf_name = $_SESSION["fn"] . " (".$_SESSION["un"].")"; $cf_email = $_SESSION["em"]; } } ?> JTI Malta - Quality Inspection Service -