Contact Us
// we are using PEAR::Mail
require_once "Mail.php";
// these are the email recipients the form is send to
$recipients = array(
"ianproctor@trinitysouth.co.uk,gerribesgrove@trinitysouth.co.uk,shujaulazam@trinitysouth.co.uk"
);
// get form values that were submitted
if ( isset($_POST['name']) ) {
$name = $_POST['name'];
};
if ( isset($_POST['name']) ) {
$visitor_email = $_POST['email'];
};
if ( isset($_POST['message']) ) {
$message = $_POST['message'];
};
// send email after submit is clicked
$errors ='';
if( isset($_POST['submit']) ) {
// check name and email are there
if( empty($name) || empty($visitor_email) ) {
$errors .= "\n Name and Email are required fields. ";
}
// send the email
if(empty($errors)) {
//echo "sending email...
"; //echo $name ."
"; //echo $visitor_email ."
"; //echo $message ."
"; $subject = "Message from the Harrow on the Hill Communities Contact Form"; $body = "From: $name - " . $message; // smtp server $host = "172.27.14.81"; // send the contact form to all these recipients // note: syntax below only works in php5 //foreach ($recipients as &$to) { for($i=0; $i $visitor_email,
'To' => $recipients[$i],
'Subject' => $subject
);
$smtp = Mail::factory('smtp',
array (
'host' => $host,
'auth' => false,
)
);
$mail = $smtp->send($recipients[$i], $headers, $body);
}
if (PEAR::isError($mail)) {
echo("
"; //echo $name ."
"; //echo $visitor_email ."
"; //echo $message ."
"; $subject = "Message from the Harrow on the Hill Communities Contact Form"; $body = "From: $name - " . $message; // smtp server $host = "172.27.14.81"; // send the contact form to all these recipients // note: syntax below only works in php5 //foreach ($recipients as &$to) { for($i=0; $i
" . $mail->getMessage() . "
"); } else { echo("Thank you!
Your message was successfully sent.
"); } } } // display error msg if(!empty($errors)) { echo nl2br($errors); } ?>Send us your stories, images, videos or information about an event you may be running locally. You can send reporter Ian Proctor an email, use the form below or call 01895 451000.

Recent Comments
"Thanks for finally talking about > Yogathon raises money for women around the world - Communities - ..."
"Nice to read your blog..."
"whoah this blog is excellent i love reading your posts. Keep up the good work! You know, many person..."
"thanks for good info.........."
"That's a tragic......"
"Why are using the words 'Trash' and Garbage'? Are you American?..."
"Sorry, the firm is called Brasier Freeth, not Brazier Freeth. And the chap that didn't return severa..."
"Simon Arbon at Brazier Freeth did not call me back despite me leaving several messages on his answer..."
"Very sad at this news. Went for a walk up there recently and could not believe it was closed. Many..."
"Congratulations to the Reverend Tim Gosden, vicar of Saint Marys Church for being chosen as HarrowÃ..."