0

i am newbie in php,i want to send email using localhost/xampp and i tried everything but no luck.i tried Change php.ini file ,sendmail, sendmail path,port and cofig my gmail details (gmail id,Password).Done everything mentioned in the tutorials in stackoverflow.

my email code

    $to= 'email@gmail.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: webmaster@example.com' . "\r\n" .     'Reply-To: webmaster@example.com' . "\r\n" .     'X-Mailer: PHP/' . phpversion(); 
    $ans = mail($to, $subject, $message, $headers);
    var_dump($ans); 
Makesh
  • 1,236
  • 1
  • 11
  • 25
jeney
  • 11
  • 4

0 Answers0