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,nataliecambrook@trinitysouth.co.uk,russellbutt@trinitysouth.co.uk,suzytalbot@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 Englefield Green & Virginia Water 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 Englefield Green & Virginia Water 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 Russell Butt an email, use the form below or call 01932 561111.

Recent Comments
"I only wanted to advise you that fine writing service online. I began using this grand writing servi..."
"Countless searches of the Research Paper Guidelines got me to experienced custom writing. I should k..."
"Richard and Henley made the whole process a delight, and the end result is an absolute triumph! We c..."
"Some time before, I really needed to buy a good house for my business but I did not have enough cash..."
"UlTa7t cqdbjhnrairs..."
"r9iR8Y onemckdxyvla..."
"cByEk7 klsqgbhgnrtk..."
"PthtAI hudztmpujfes..."
"C7jxi6 jxkvotlrhlbh..."
"n9xWE5 ssrcjhhibjkk..."