Hi
I am trying to use the PHP mail() function on a hosted website. I pay for the host and I am assured that this function is allowed and working.
My script will not send an email, here is the script:
<?php
echo "Trying to send an email...<BR>";
$test = mail("rich@c2h2.co.uk", "My Subject", "Line 1\nLine 2\nLine 3");
if ($test) {
echo "It worked";}
else {
echo "It failed";}
?>
I always get the following result.....
"Trying to send an email...
It failed"
Can anyone see a problem with my code, or do you think there may be a problem with using this function on this server?
Many thanks
Richard