I have a php application I have running on my Xampp localhost. It has a user registration via email service, whereby a new user will register via email, but the account will not be active till activated by clicking on an email link sent to the email the user registered with.
I send email as follows:
<html>
<head>
   <title>Sending email using PHP</title>
</head>
<body>
   <?php
   $to = "user@yahoo.com";
   $subject = "This is subject";
   $message = "This is simple text message.";
   $header = "From:user@GMail.com \r\n";
   $retval = mail ($to,$subject,$message,$header);
   if( $retval == true )  
   {
      echo "Message sent successfully...";
   }
   else
   {
      echo "Message could not be sent...";
   }
   ?>
</body>
</html>
The email doesn't get sent. Is there something that I need to do before I can send email from a test website, or what is it I'm doing wrong?
Thank you all in advance.
