PHP email sent is successful but not receiving in Inbox

Hi there

This is my code that I am using to send email from gmail SMTP server to from my PHP program

 $mail=new PHPMailer();
 $mail->Subject="This is My Email subject";
 $mail->Body="This is Body of send email";
     echo "Mail Error:".$mail->ErrorInfo;
 echo "Message has been sent";

I am getting message printed in output in browser window as

“Message has been sent”

but not email in my send inbox

I have tried these things
1)Opened less secure apps in associated gmail account in form
2)different port 465,587 on windows

where is wrong?


Have you tried enabling SMTPDebug?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.