getEmail(); $mail_subject = 'Question from Website'; //the message subject (required) $mail_body = "This is a question from $fname $lname Name: $lname, $fname Email: $email Contact Phone: $phone Question(s): $question "; //the message body (required) $recipients = $mail_to; $headers['From'] = 'website@curtgasperteam.com'; $headers['To'] = $mail_to; $headers['Subject'] = $mail_subject; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory('smtp', $params); $send = $mail_object->send($recipients, $headers, $mail_body); if (PEAR::isError($send)) { $errormsg = "There was a problem"; } else { $emailsent = "Y"; } $msg = "Thank you for submitting your question(s). I will get back to you as soon as possible."; } } ?> Contact <?= ucwords(strtolower(htmlspecialchars($agent->getNameNice()))) ?> $iderr

"; } else { ?>

Contact getNameNice()))) ?>

$msg

"; } else { if (isset($err)) { echo "
$err
"; } else { echo "

First and Last Name are required as well as Email Address and/or Phone Number.

"; } ?>