How to configure XAMPP to send mail from localhost using PHP ?
https://www.geeksforgeeks.org/how-to-configure-xampp-to-send-mail-from-localhost-using-php/
Last updated
https://www.geeksforgeeks.org/how-to-configure-xampp-to-send-mail-from-localhost-using-php/
Last updated
To configure XAMPP server to send mail from localhost we have to make changes to two files sendmail.ini and php.ini. Open the xampp folder. By the name of “sendmail.ini” is present in sendmail file and “php.ini” is present in php file in the xampp folder.
Step 1:
Go to C:\xampp\sendmail: open sendmail.ini file in notepad or any text editor and make the changes as follows.
Step:2
Go to C:\xampp\php: open php.ini file in notepad or any text editor goto [mail function] part and make the changes as follows.
After following the given steps if the mail is not sent by calling the mail function, then goto C:\xampp\sendmail open error.log to see thee error occurred.
Note: Here the procedure is shown for gmail, but it can be extended to other mails by changing the smtp server, port number. When using gmail take care to enable the option to allow access to less secure webapp.