I wrote a very simple bit of code to check whether the mail() function works:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mail test</title>
</head>
<body>
<?php
mail('dominicdem@gmail.com','test email from mail_php','Saturday 21 Jan 2012','From: webmaster@stmarysplattchurch.org.uk' . "\r\n" . 'Reply-To: contact@stmarysplattchurch.org.uk' . "\r\n" . 'X-Mailer: PHP/' . phpversion());
echo "mail sent";
?>
</body>
</html>
It echoes mail sent on loading the page, but nothing arrives at gmail. I checked with my host and they said my code should work, and that there is nothing server side that would stop it working. Can any of you guys think of anything?
Thanks in advance
Dom


