Contact Us
// we are using PEAR::Mail
require_once "Mail.php";
// these are the email recipients the form is send to
$recipients = array(
"stevebax@trinitysouth.co.uk,adrianseal@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 GWest Ealing & Hanwell 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 GWest Ealing & Hanwell 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 Steve Bax an email, use the form below or call 020 8572 1816.

Recent Comments
"James, I would just like to comment that a letter of apology has not been received from Councillor ..."
"A primary school is hoping to lead the way in healthy eating as they will be running free workshops ..."
"Jacob's ladder was never a well light location. even when i was a litle gutter snipe some 50+ years ..."
"Dear Adrian, Thankyou for your reply, I apologize for the long delay! I will send you an article..."
"Do not cut my local hospital A&E services, I have used it and it's good...."
"My freedom pass needs to be renewed next week - a week before I go back to school. I send the letter..."
"trying to get in contact with Frankie Cordwell could you forward information to me please...."
"Ealing council has got my renewal freedom pass form in first week January 2010 to date have not rece..."
"Both phone numbers and e-mail addresses for Virendra Sharma are correct. The contact details in the..."
"Hi, I work for a young persons charity. How would I get my charity involved in this event? Kind R..."