I am using following code to send email from a windows server
$message = "Email From Sami";
$to = 'myid@gmail.com';
$subject = " test colr";
ini_set('display_errors',1);
$mail=mail($to, $subject,$message );
if($mail)
{
echo "Thank you for using our mail form"; // I am getting this message
}
else
{
echo "Mail sending failed.";
}
But neither I am getting any error nor email is being received at target email (I have tried different target email addresses).
I have set smtp=localhost
and port=25
in php.ini already. On the same server mail is being sent successfully from iis (Microsoft server). But getting no error or result from php mail