I tried to send emails. I get the success message. But I receive no emails in my inbox. Is it because I installed xampp in D drive instead of C drive? This is my code:-
<?php
$to = "bikloo.talukdar@gmail.com";
$sub = "My Subject";
$msg = "This is a test message";
if (mail($to, $sub, $msg))
{
echo "Email sent successfully .....";
}
else
{
echo "Email not sent .....";
}
?>
I have also made the settings in php.ini as:
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = bikloo.talukdar@gmail.com
sendmail_path = "\"D:xampp\sendmail\sendmail.exe\" -t"
My settings in sendmail.ini:
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=bikloo.talukdar@gmail.com
auth_password=*********
force_sender=bikloo.talukdar@gmail.com
I have even allowed access to less secure apps. Still I am not receiving emails in my inbox. Can anyone help me?