Send Mail From Localhost with XAMPP
In php.ini [mail function] change to:
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = my-gmail-id@gmail.com
sendmail_path = “\”C:\xampp\sendmail\sendmail.exe\” -t”
In sendmail.ini replace to this:
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=my-gmail-id@gmail.com
auth_password=my-gmail-password
https://coderwall.com/p/zfwxvw/send-mail-from-localhost-with-xampp
How to setup local email server using XAMPP (Mercury mail): https://www.youtube.com/watch?v=7dcaUUlsMOg