Quick way – Configure XAMPP To Send Mail Through Localhost 2019?

Succeed With CONFIGURE XAMPP TO SEND MAIL THROUGH LOCALHOST 2019 In 5 MINUTES?

As we all know that sending mail in xampp through localhost can be much more painful if we don't know to configure xampp to send mail through localhost.

Then I thought it will be helpful to all if I can provide them with an easy solution. After spending my quality time on research finally, I came up with a solution which I am disclosing here.

Xampp is the local best server for PHP, Perl, and MySQL.XAMPP helps to create and develop your own applications using Web services technologies. Many people know from their own experience that it. Easy to use controlpanel. Let's come to the point of xampp setup to send mail through localhost.

Here are the steps :

Set SMTP host and port in php.ini.
Set sendmail_path = "{path to xampp}\sendmail\sendmail.exe\" -t" in php.ini
In sendmail.ini under sendmail folder in xampp, set
smtp_server to what you have set in php.ini
smtp_port
smtp_ssl
auth_username
auth_password
force_sender
hostname
Simply call the mail function with all the arguments properly passed

Note: don't forget to replace my-Gmail-id and my-Gmail-password in above code.
Also, don't forget to remove duplicate keys if you copied settings from above.
For example comment following line if there is another sendmail_path: sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe" in the php.ini file

Remember not to forget to restart xampp control panel so the changes take effect.

My name is Gopal Bogati. I am computer engineer by education, fascinating lover of new technology, fond of writing and reading tech-related articles, Youtuber and Blogger by passion, working as a software engineer in the field of Web Development, fond of spending time on solving tech-related issues.

Author: Er Gopal Bogati

My name is Gopal Bogati. I am computer engineer by education, fascinating lover of new technology, fond of writing and reading tech-related articles, Youtuber and Blogger by passion, working as a software engineer in the field of Web Development, fond of spending time on solving tech-related issues.
View all posts by Er Gopal Bogati