Search code examples
phpphpmailer

mail is not received after sending using phpmailer?


below is my code

im getting success displayed on screen but mail is not received

i changed correctly in sendmail.ini file in sendmail folder in xampp and also php.ini file in php folder

i have checked in spam also

can someone please help me thank youu!

<?php
if(mail("sender gmail address","subject","message","From: my gmail address")){
   echo "success";
}
else{
   echo "failed";
}
?>

Solution

  • thanks its working now !

    in C:\xampp\php\php.ini find extension=php_openssl.dll and remove the semicolon from the beginning of that line to make SSL working for gmail for localhost.

    initially it was commented.

    thankyouuuu