Go to C:\xampp\php [mail function] SMTP=smtp.gmail.com smtp_port=587 sendmail_from = YourGmailId@gmail.com sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
C:\xampp\sendmail [sendemail] smtp_server=smtp.gmail.com smtp_port=587 error_logfile=error.log debug_logfile=debug.log auth_username=YourGmailId@gmail.com auth_password=Your-Gmail-Password force_sender=YourGmailId@gmail.com(optional)