To start, here are my system specs:
Ubuntu 6.06 LTS server
Apache2, MySQL, PHP5
(chose LAMP installation option during install of Ubuntu)
IPKungFu (firewall, all out-bound traffic is allowed)
My mail.php script:
<?php $to = 'firstname.lastname@example.org'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: email@example.com' . "\r\n" . 'Reply-To: firstname.lastname@example.org' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?>
I copied the code from http://us2.php.net/function.mail simply to see if the mail function would work. Of course I replaced 'email@example.com' with my real email address.
Now when I run mail.php, I'm not seeing an email in my inbox. I waited for a few more minutes and refreshed my inbox, but still no email. I'm new to the mail() function so I'm not sure what all is required to properly run it. Does the mail() function require a mail server to be installed on my Ubuntu box? I hope not, since all I want to use the mail() function for is to send myself alerts if certain parts of my code fail.
Thank you for your time,