One last thing. I'm new to PHP, just started learning it this week. But can you help me find whats wrong with my code?
Code:
<html>
<?php
$to = "myemail@yahoo.com";
$subj = "Test";
$message = "This is a mail service test message.";
$mailsend = mail($to,$subj,$message);
if (!$mailsend)
{
echo "Mail not sent.";
}
else
{
echo "Mail sent.";
}
?>
</html>
That is my entire code, and it's supposed to execute the mail function immediately when the page loads, or so I've understood.
But that's my code, is something wrong with it that would cause me to get this outcome: Mail not sent.
Every time i try to run the script?
Bookmarks