[Lancaster] Help needed with email from web pages

Ken Hough kenhough at uklinux.net
Thu Jun 28 14:41:05 BST 2007


Hi Guys!

Can you help me? I'm building a website and need to provide for sending
email messages from within the site.

I been using PHP and for test/dev purposes run my own local webserver
(apache with mod_php). I know that the  web server and the PHP bit work
OK, because the website uses PHP successfully for a number of other tasks.

Using the very simple code:

<?php
// The message
$message = "Line 1\nLine 2\nLine 3";

// In case any of our lines are larger than 70 characters, we should use
wordwrap()
$message = wordwrap($message, 70);

// Send
$x = mail('kenhough at uklinux.net', 'My Subject', $message);

echo $message.'<br>';
if($x == TRUE) echo "TRUE".'<br>';
if($x == FALSE) echo "FALSE".'<br>';
?>

appears to send a message  ---  at least judging by the LED activity on
my ADSL /router, but no messages appear in my mail box and 'TRUE' is
echoed to the screen.

What am I missing?

Can annyone recomend a good Internet link on the subject?


Ken Hough



More information about the Lancaster mailing list