'', 'email' => '', 'message' => '', 'captcha' => '', ); $contactDetails = '
I found some possible mistakes with the information you provided. Please check the messages below and adjust your information accordingly
* '.$msg.'
';
}
echo '
Your message has been sent to Kimberly and you can expect
a reply in due course.
Please use the form below to send me a message.
COMPANY_NAME.' <'.MAIN_EMAIL.'>', 'To' => COMPANY_NAME.' <'.MAIN_EMAIL.'>', 'Reply-To' => $data['name'].' <'.$data['email'].'>', 'Subject' => ADMIN_SUBJECT, ); $mime = new Mail_mime(CRLF); $mime->setHTMLBody(getAdminHTMLBody($data)); //$mime->setTXTBody(getTXTBody($data)); $body = $mime->get(); $hdrs = $mime->headers($headers); $mail =& Mail::factory('smtp',array( 'host'=>SMTP_HOST, 'auth'=>SMTP_AUTH, 'username'=>SMTP_USER, 'password'=>SMTP_PASS, 'port'=>SMTP_PORT, 'localhost'=>'localhost',) ); return $mail->send(MAIN_EMAIL,$hdrs,$body); } function getAdminHTMLBody($data=array()) { $body = file_get_contents(ADMIN_EMAIL_TMPL); $body = str_replace('{#NAME#}',htmlentities($data['name']),$body); $body = str_replace('{#EMAIL#}',htmlentities($data['email']),$body); $body = str_replace('{#MESSAGE#}',nl2br(htmlentities($data['message'])),$body); $body = str_replace('{#DATE#}',date("l jS F Y, H:i"),$body); $body = str_replace('{#REMOTE_INFO#}', 'IP Address: '.$_SERVER['REMOTE_ADDR'].'