$page_title = "Contact Us"; if ($_POST["form_submit"]) { $first_name = $_POST["first_name"]; $last_name = $_POST["last_name"]; $name = $first_name . " " . $last_name; $company = $_POST["company"]; $email = $_POST["email"]; $phone = $_POST["phone"]; $inquiry = $_POST["inquiry"]; $attorney = $_POST["attorney"]; $comments = $_POST["comments"]; $valid = true; set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] . 'includes/PEAR' . PATH_SEPARATOR); $subject = "Inquiry from Horzepa Spiegel Website"; $headers = 'From: ' . $name . ' <' . $email . '>' . "\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'); ?>Horzepa Spiegel & Associates is headquartered in Houston, Texas, and serves the New York metropolitan area through its office in New York City. Our offices operate as "one firm" and through our substantial investment in our information technology infrastructure, all of our lawyers, regardless of location, are available to our clients, anywhere in the world.