Attention! You must enter your name.'; exit(); } else if(trim($email) == '') { echo '
Attention! Please enter a valid email address.
'; exit(); } else if(!isEmail($email)) { echo '
Attention! You have enter an invalid e-mail address, try again.
'; exit(); }else if(trim($comments) == '') { echo '
Attention! Please enter your message.
'; exit(); } if(get_magic_quotes_gpc()) { $comments = stripslashes($comments); } // Configuration option. // Enter the email address that you want to emails to be sent to. // Example $address = "joe.doe@yourdomain.com"; //$address = "example@themeforest.net"; $address = "soawebtech@gmail.com"; // Configuration option. // i.e. The standard subject will appear as, "You've been contacted by John Doe." // Example, $e_subject = '$name . ' has contacted you via Your Website.'; $e_subject = 'You\'ve been contacted by ' . $name . '.'; // Configuration option. // You can change this if you feel that you need to. // Developers, you may wish to add more fields to the form, in which case you must be sure to add them here. $e_body = "You have been contacted by $name, their additional message is as follows." . PHP_EOL . PHP_EOL; $e_content = "\"$comments\"" . PHP_EOL . PHP_EOL; $e_reply = "You can contact $name via email, $email"; $msg = wordwrap( $e_body . $e_content . $e_reply, 70 ); $headers = "From: $email" . PHP_EOL; $headers .= "Reply-To: $email" . PHP_EOL; $headers .= "MIME-Version: 1.0" . PHP_EOL; $headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL; $headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL; if(mail($address, $e_subject, $msg, $headers)) { // Email has sent successfully, echo a success page. echo "
"; echo "
"; echo "

Email Sent Successfully.

"; echo "

Thank you $name, your message has been submitted to us.

"; echo "
"; echo "
"; } else { echo 'ERROR!'; }