Contact Us

By Phone

(503) 644-1300

Please enter all required fields.
'; } else if( !preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is', $_POST['Email']) ) { echo '
Invalid email address.

'; } else if(md5(strtolower($_POST['verify_code'])) != $_SESSION['verify']) { echo '
Invalid security code.

'; } else { unset($_POST['action'], $_POST['verify_code']); //create email body $email_body = 'Date: ' . date('l, F j, Y - h:i A') . "\n\n"; foreach($_POST as $field => $value) { $field = str_replace('_', ' ', $field); $email_body .= $field . ': ' . trim($value) . "\n"; } $email_body .= "\n\nIP Address: " . $_SERVER['REMOTE_ADDR']; // send email //$mail->AddAddress('hai@dwassoc.com', 'Hai Nguyen'); $mail->AddAddress('oregon@oregonreport.com'); $mail->Subject = 'Contact Us: '.$_POST['Subject']; $mail->AddAddress(trim($_POST['Email'])); $mail->Sender = trim($_POST['Email']); $mail->FromName = trim($_POST['Name']); $mail->From = trim($_POST['Email']); $mail->IsHTML(false); $mail->Body = stripslashes($email_body); if( !$mail->Send() ) { echo '
Your message failed to send. Please try again.

'; } else { echo '
Thank you! Your message has been sent successfully.

'; $display_form = false; session_destroy(); } } } if($display_form == true) { ?>
* Your Name:
* Your Email:
* Subject:
* Message:
* Security Code: