"", "{EMAIL_LOGO}" => "", "{EMAIL_TITLE}" => "", "{CUSTOM_URL}" => "", "{CUSTOM_IMG}" => "", "{TO_NAME}" => "", "{TO_EMAIL}" => "" ); //create email headers $headers = "From: TEAM GEESE \r\n"; $headers .= "MIME-Version: 1.0 \r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; if(file_exists($templateFile)){ $message = file_get_contents($templateFile); }else{ die("unable to locate the template file"); } //Now replace all the search swap var foreach(array_keys($swap_var) as $key){ if(strlen($key)>2 && trim($key) != ""){ $message = str_replace($key, $swap_var[$key], $message); } } // if(DEMO){ // die("
no email was sent on purpose!!"); // } //display the email message to the user echo $message; //send email to the user if(mail($email_to, $subject, $message, $headers)){ echo "
Success"; }else{ echo "
Not-Sent"; } ?>