i have changed php.ini and sendmail.ini to these settings: smtp.gmail.com (TLS enabled, port 587) and then i put auth_username and auth_password.
<?php
$to = "[email protected]";
$subject = "subject";
$txt = "How are you ?";
$headers = "From: [email protected]" . "\r\n";
$send=mail($to,$subject,$txt,$headers);
if($send){
echo "sent";
}else{
echo "not sent";
}
?>
i have tried send email using hotmail with changing the above settings and it worked, but with gmail not working...