1 ){ echo "More than one email address given, please go back and correct this error!"; } else{ $shadow = "on"; // include the phpmailer scripts here and you are good to go //$contact = $name; include('./scripts/php/php_mailer/class.phpmailer.php'); $msg = "

$contact would like to be contacted

"; $msg.= "

Property MLS: $_mls

"; $msg.= "

Contact: $contact

"; $msg.= "

Email: $email

"; $msg.= "

Phone Number: $phone

"; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->HOST = "67.227.197.19"; $mail->SMTPAuth = true; $mail->Username = "contact-me@patlotz.com"; $mail->Password = "dozzer01"; $mail->From = "cs@michiganhomesforeclosures.com"; $mail->FromName = "Michigan Homes Foreclosures Website"; $mail->AddAddress("pat@patlotz.com"); $mail->AddAddress("skilotz@gmail.com"); //$mail->AddAddress("jnashif@us-mattress.com"); //$mail->AddAddress("jaybale@gmail.com"); $mail->AddReplyTo($email,$contact); $mail->WordWrap = 150; $mail->IsHTML(true); $mail->Subject = "Contact Request From Website"; $mail->Body = $msg; $mail->AltBody = "$contact would like to be contacted regarding, $email"; $success = false; if( !$mail->Send() ){ // it's failed lets put in error stuff $error = "YES"; $err_msg = "There was a problem sending your service request, please go back and re-send your message"; $err_msg .= "
" . $mail->ErrorInfo; } else{ $mail2 = new PHPMailer(); $mail2->IsSMTP(); $mail2->HOST = "67.227.197.19"; $mail2->SMTPAuth = true; $mail2->Username = "contact-me@patlotz.com"; $mail2->Password = "dozzer01"; $mail2->From = "cs@michiganhomesforeclosures.com"; $mail2->FromName = "Michigan Homes Foreclosures Website"; $mail2->AddAddress($email,$contact); //$mail2->AddAddress("pat@patlotz.com","Pat Lotz"); $mail2->AddReplyTo($email,$contact); $mail2->WordWrap = 150; $mail2->Subject = "Your Contact Request Has Been Sent"; $mail2->Body = "

Thank you for contacting us regarding your interest in Real Estate in the Brighton, Howell and Pinckney area. A Foreclosure Specialist will contact you shortly with any information you requested.

In the meantime, if there is any additional information we can provide, please feel free to contact us directly at (810) 626-5600.

"; $mail2->AltBody = "We've sent your request to cs@michiganhomesforeclosures.com, someone should follow-up shortly"; $success = true; if( !$mail2->send() ){ $error = "YES"; $error_msg .= "
There was a problem sending your confirmation email, however, your original message was succesfully sent to cs@michiganhomesforeclosures.com"; $error_msg .= "
" . $mail2->ErrorInfo; $sent_msg = $error_msg; } else{ $sent_msg = "We've sent your request to cs@michiganhomesforeclosures.com, please feel free to contact us with any additional questions or comments via e-mail."; } } } } } $photos = array(); $thisMLS = $_REQUEST['mls']; $theseimgs = get_images($thisMLS); $IMGS = explode(",",$theseimgs); foreach( $IMGS as $_i ){ $photos[] .= "http://www.michiganhomesforeclosures.com/listing_images/" . $_i; } function get_images($M){ $q = mysql_query("select * from listing_images where MLSNUMBER = '$M' order by ID LIMIT 1"); $retstr = ""; while( $row = mysql_fetch_array( $q ) ){ $retstr .= $row['imgname'] . ","; } $retstr = substr($retstr,0,-1); // removing trailing , return $retstr; } ?> <?php echo $p_title;?>

Contact Us

Complete the attached form and we will contact you about the home you have selected.

' . $_address_comb1 . '
'; $address_comb2 = ucwords(strtolower($row['CITY'])) . ', ' . strtoupper($row['STATE']) . ' ' . $row['ZIP5'] . '-' . $row['ZIP4']; echo '
' . $address_comb2 . '

'; } ?>
Name:*

Email Address:*

Phone Number: