\r\n"; $header .= "MIME-Version: 1.0\r\n"; //$header .= "Mailer: Olaf's mail script version 1.11\r\n";not used $header .= "Content-Type: text/html; charset=\"utf-8\"\r\n";//not used //header .= "Content-Transfer-Encoding: 7bit\r\n"; $subject =$contactus_msg_subject; $body=implode(' ',file("email.htm")); $body=str_replace("{full_name}",$_POST['full_name'],$body); $body=str_replace("{address}",$_POST['address'],$body); $body=str_replace("{tel}",$_POST['phone'],$body); $body=str_replace("{mobile}",$_POST['mobile'],$body); $body=str_replace("{fax}",$_POST['fax'],$body); $body=str_replace("{site}",$_POST['site'],$body); $body=str_replace("{job}",$_POST['job'],$body); $body=str_replace("{company}",$_POST['company'],$body); $body=str_replace("{email}",$_POST['email'],$body); $body=str_replace("{country}",$_POST['country'],$body); $body=str_replace("{city}",$_POST['city'],$body); $body=str_replace("{comments}",nl2br($_POST['comments']),$body); /*$time=time(); $date=date("d-m-y h:i:s",$time);*/ $date=date("Y-n-j"); if (mail($webmaster_mail, $contactus_msg_subject, $body, $header)) { $str=implode('',file('thank_message.htm')); echo $str; } else { $str=implode('',file('error_message.htm')); echo $str; } } switch($_GET['op']) { case 'sendmail': do_send(); break; default: show_contactus_page(); break; } ?>