How to configure XAMPP to send mail from localhost using PHP ?

--Resource --

1. Yahoo Account

1. Create yahoo account
2. Go to yahoo mailbox
3. Click on your profile picture and again click on it.
4. Go to Account security
5. "Generate and manage app passwords" - generate a password
6. This password will be use for authentication

2. Go to C:\xampp\sendmail\sendmail.ini

1. change smtp_server=mail.yourdomain.com to smtp_server=smtp.mail.yahoo.com
2. change smtp_port to smtp_port=587
3. change smtp_ssl=auto to smtp_ssl=tls
4. uncomment ;error_logfile=error.log to error_logfile=error.log
5. uncomment ;debug_logfile=debug.log to debug_logfile=debug.log
6. write your gmail id in auth_username: auth_username=*****@yahoo.com
7. write your gmail assword in auth_password: auth_password=*****
8. write your gmail id in force_sender=*****@yahoo.com
9. change hostname to hostname=localhost

3. Go to C:\xampp\php\php.ini

1. comment SMTP=localhost by putting semicolon infront=> ;SMTP=localhost
2. comment smtp_port=25 by putting semicolon infront=> ;smtp_port=25
3. comment sendmail_from= by putting semicolon infront=>;sendmail_from=specify path of file in sendmail_path to sendmail_path=C:\xampp\sendmail\sendmail.exe
4. un-comment extension=php_openssl.dll

4. Error & Debug

1. C:\xampp\sendmail open error.log
2. C:\xampp\sendmail open debug.log