I am using Windows Server 2003 Enterprise Edition. On this server, I have configured SMTP. While configuring SMTP, I have provided gmail.com in one of the fields.
I have following two files on Windows Server 2003 Enterprise Edition. phpTest2.html
<h2>Alien Abduction Form</h2>
<form action="phpTest2.php" method="POST">
When It Happened :<input type="text" name="whenithappened" /><br />
How Long :<input type="text" name="howlong" /><br />
<input type="submit" value="submit" /><br />
$when_it_happened = $_POST['whenithappened'];
$how_long = $_POST['howlong'];
$to = 'firstname.lastname@example.org';
$subject = 'PHP Test';
$msg = $when_it_happened.$how_long ;
mail($to, $subject, $msg);
echo "your message is received";
When I send data using form in phpTest2.html and invoke phpTest2.php, I get the message "your message is received" on my screen. So I assume that message has been sent. But when I check gmail account, I dont see any emails there.
Before configuring SMTP, when I used this script, I was getting an error message that SMTP i not set up. But now, I am not getting this message any more and I am not getting emails in specified gmail acccount. So whats wrong in here ?