"; $status= "NOTOK"; } else { if (!stristr($email,"@") OR !stristr($email,".")) { // checking email format $msg .="Whoops! Your email address isn't right!
"; $status= "NOTOK";} } if (strlen($name) <2 ) { // checking name $msg .="Whoops! You forgot to write your name!
"; $status= "NOTOK";} if (strlen($phone) <2 ) { // checking phone number $msg .="Whoops! You forgot to write your phone number!
"; $status= "NOTOK";} if (strlen($comment) <2 ) { // checking comment $msg .="Whoops! You forgot to write a comment!
"; $status= "NOTOK";} if($status=="OK"){ // all validation passed /// setting up and sending multipart email $subject = "website enquiry"; $boundary = md5(uniqid(time())); //recipient $toEmail = "paul.gaughan@xalonassociates.com"; // $message is plain text $message = "someone filled in the contact form on the website: \n\n"; $message .="Name: ".$name."\n\n"; $message .="Email Address: ".$email."\n\n"; $message .="Phone Number: ".$phone."\n\n"; $message .="Comment: ".$comment."\n\n"; // message_html is the html version of the email $message_html = "

someone filled in the contact form on the website:

\n"; $message_html .="

Name: ".$name."

\n"; $message_html .="

Email Address: ".$email."

\n"; $message_html .="

Phone Number: ".$phone."

\n"; $message_html .="

Comment: ".$comment."

\n"; // this sets up all the email ready to send $headers = 'From: ' . $email . "\n"; $headers .= 'To: ' . $toEmail . "\n"; $headers .= 'Return-Path: ' . $email . "\n"; $headers .= 'MIME-Version: 1.0' ."\n"; $headers .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '"' . "\n\n"; $headers .= $body_simple . "\n"; $headers .= '--' . $boundary . "\n"; $headers .= 'Content-Type: text/plain; charset=ISO-8859-1' ."\n"; $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n"; $headers .= $message . "\n"; $headers .= '--' . $boundary . "\n"; $headers .= 'Content-Type: text/HTML; charset=ISO-8859-1' ."\n"; $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n"; $headers .= $message_html . "\n"; $headers .= '--' . $boundary . "--\n"; //this actually sends the email $mailOk=mail('', $subject,'', $headers); } // end of POST } ?>
Xalon Associates Making Migration Second Nature

Contact Us

".$msg.""; // end of error checking } ?>

"/>

"/>

"/>

Thank you for the comment!

"; echo "

We'll get back to you as soon as possible.

"; } ?>

Please find us at:

Xalon Associates
20 Rosebury Square
Woodford Green
Essex IG8 8GT
Tel: 08456 447997
Email: info@xalonassociates.com