Mail() function not working...
Posted: Wed Jul 07, 2010 9:02 pm
Hey guys, I'm currently writing a script that requires the mail() function and it's not working for me... I isolated my mail() code and it's still not working. Here's the code:
I've tried it both with and without the $from included in the additional headers param.
The page is always displaying "success" but there is no new mail in my inbox :/
Any ideas?
Thanks guys!
Code: Select all
<?php
$subject = 'hello!';
$to = 'my@email.com';
$content = 'Hello World!';
$from = 'From: hello@test.com';
if(mail($to, $subject, $content, $from)) {
echo "Success!";
} else {
echo "failure";
}
?>
The page is always displaying "success" but there is no new mail in my inbox :/
Any ideas?
Thanks guys!