' . "\r\n"; if ($valid) { $message = "Phone: " . $phone . "\nCompany: " . $company . "\n\n"; $message .= "I'm contacting you about: " . $inquiry . "\n\n"; $message .= "And am interested in speaking to: " . $attorney . "\n\n"; $message .= "Comments: " . $comments; $headers = array(); $headers["From"] = "webmaster@horzepalaw.com"; $headers["Subject"] = $subject; $smtpinfo["host"] = "mail.horzepalaw.com"; $smtpinfo["port"] = "25"; $smtpinfo["auth"] = true; $smtpinfo["username"] = "webmaster@horzepalaw.com"; $smtpinfo["password"] = "w3bm4st3r"; require_once('Mail/Mail.php'); //echo "
";
        //print_r($mail);
        //print_r($error);
        //echo "
"; //if (PEAR::isError($error)) { // echo("

" . $mail->getMessage() . "

"); //} else { // echo("

Message successfully sent!

"); //} if ($attorney == 'Andrea Almeida, Esq.') { $to = "aalmeida@horzepalaw.com"; } else if ($attorney == 'Joseph E. Horzepa, Esq.') { $to = "jhorzepa@horzepalaw.com"; } else if ($attorney == 'Joshua J. Spiegel, Esq.') { $to = "jspiegel@horzepalaw.com"; } else { $to = array(); $to[] = "jhorzepa@horzepalaw.com"; $to[] = "jspiegel@horzepalaw.com"; $to[] = "aalmeida@horzepalaw.com"; } //$smtpinfo["debug"] = true; $headers["To"] = $to; $mail =& Mail::factory("smtp", $smtpinfo); $error = $mail->send($to, $headers, $message); $success = "Thank you for contacting us, someone from our office will contact you soon."; } else { $error = "There was a problem with the email address you submitted, please enter your email address again."; } } include('includes/header.php'); ?>