check($code); if($valid == false) { $errormsg = "Sorry, the code you entered was invalid, please try again."; } } if (isset($errormsg) == false) { if (strlen($fullname) > 0 && strlen($address) > 0 && strlen($city) > 0 && strlen($state) > 0 && strlen($zip) > 0 && strlen($homephone) > 0 && strlen($besttime) > 0) { $to = "connect@cbhearthside.com"; //$to = "jim@scarletfire.net"; $recipients = $to; $headers['From'] = 'info@cbhearthside.com'; $headers['To'] = $to; $headers['Subject'] = "DESTINATION REFERRAL"; $msg = "Form submission date - ".date("m-d-Y H:i:s")."\n" . "Full Name: $fullname\n" . "Spouse Name: $spousename\n" . "Address: $address\n" . "City: $city\n" . "State: $state\n" . "Zip: $zip\n" . "Home Phone: $homephone\n" . "Cell Phone: $cellphone\n" . "Email: $email\n" . "Best time/method: $besttime\n" . "Working with: $agentname\n" . "Interest: $interest\n"; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory('smtp', $params); $send = $mail_object->send($recipients, $headers, $msg); if (PEAR::isError($send)) { $errormsg = "There was a problem"; } else { $emailsent = "Y"; } } else { $errormsg = "Please make sure all fields are filled in!"; } } } ?> Find an Agent Program

Thank you for your interest!

Your request has been sent, someone from our office will get back to you shortly.

".$errormsg."
"; } ?>
  Fields in bold are required
Full Name:
Spouse/Partner Name:
Address:
City:
State:
Zip:
Home Phone:
Cell Phone:
Email:
Best time/method to reach you:
If you are currently working with or have had contact with a Coldwell Banker Hearthside agent, please provide agent name:
Are you interested in buying or selling a home or both?
Security Code: Security Code Refresh Security Code
Verify Code: