0; if ( $isPostBack ) { //- Bring in the config and scripts. -// require_once('includes/site-config.php'); require_once('includes/phpmailer/maildragon.php'); //- Get field data. -// $vName = $_POST['fullname']; $vMail = $_POST['emailaddress']; $vPhone = $_POST['phone']; $vMessage = $_POST['mailmessage']; $lValidateSign = $_POST['validate_sign']; //- Validation. -// if(empty($vName) || empty($vMail) || empty($vMessage )) { //- Validate empty fields. -// $errorMsg = "Please complete all fields on the form."; } else if( !ereg( "([0-9a-z.-]+)@([0-9a-z.-]{3,})\.([a-z]{2,})", $vMail) ) { //- Validate email address. -// $errorMsg = "The email address you have entered has not been typed correctly. Please fix this and try again."; } //- Check the banlist. -// else if ( !empty( $site['banwords'] ) ) { foreach($site['banwords'] as $word) { if ( stristr($vMessage,$word) !== false ) { $errorMsg = "Your message contains words commonly used in spam messages. Please reword your message before sending it."; break; } } } //- Validate CAPTCHA. -// else if ( !isset($_SESSION["validate_sign_session"]) ) $errorMsg = "You do not have cookies enabled. Please email us directly at "; else if ($_SESSION["validate_sign_session"] != $lValidateSign) $errorMsg = "Invalid image verification code. Please try again."; //- Clear the validate code. -// unset($_SESSION["validate_sign_session"]); if ( empty( $errorMsg ) ) { //- Set up the mailer. -// $mailer = new MailDragon(); $mailer->FromName = $vName; $mailer->From = $vMail; $mailer->AddAddress($site['from_email'], $site['from_name'] ); // $mailer->AddAddress('hargobind.khalsa@gmail.com', 'Hargobind' ); $mailer->Subject = "Message from Website Visitor"; //- Create the message body. -// $vMessage = stripcslashes($vMessage); $mailer->Body = "From: $vName\r\nEmail: $vMail\r\n" . ( !empty( $vPhone ) ? "Phone: $vPhone\r\n" : "" ) . "\r\n----\r\n\r\n$vMessage\r\n"; //- Send it. -// if(!$mailer->Send()) { $errorMsg = 'There was a problem sending the message. Please email me directly at ' . $site['from_email'] . '.

' . $mailer->ErrorInfo; } else { //echo 'Mail sent!'; } } } ?> GMK Web Design
cloud banner

Contact Us


Thank You! Your message has been sent. We will respond as soon as possible.

' . $errorMsg . '

'; } ?>

For more information about our services, please contact us using the form below, or by phone at 505-747-1476:

Name: *

Email: *

Phone:

Image verification code:

Please type the code from the image above: *

Your message: