Page 1 of 1

Configuration required to send email from Apache/Lampp

PostPosted: 25. September 2017 13:53
by er_sachin_gupta
Hello Friends,
I am a new user of Apache Xampp on Linux Server (RedHat).
I have installed lampp on Linux Server. I am running php /mysql application on that lampp linux server.
Postfix is installed there on Linux.

I have also sent email from that postfix using sendmail (From terminal using putty). So mail is being sent, its verified.

I am getting problem in doing configuration on apache / lampp to be able to send emails with postfix /sendmail.

Please help me with correct configuration to do to achieve the required.

I have spent 1 day for this. But unable to find. Please help me, I am doing this very first time.

Thanks in advance.

Re: Configuration required to send email from Apache/Lampp

PostPosted: 25. September 2017 20:20
by Nobbie
Apache cannot send Emails. Only PHP (and Perl etc.) can. The PHP mail() function is the only API in PHP to send emails. You have to edit php.ini and apply either an SMTP Server (usually "localhost") or the path to sendmail binary. Edit php.ini and watch out for SMTP etc.

But there remains the main problem, that PHP mail() cannot use login/password credentials for any SMTP server, the API dont know user and password. Its an old and poor API. Therefore most third party scripts (like Joomla etc.) do not use mail() function, it uses PHPMailer Class or similar (which is not part of Xampp, Joomla installs PHPMailer by itself). I dont know what you are going to establish, but you cannot do anything in Xampp to enable Emails, you have to follow either the documentaion of Joomla etc. or (for your own scripts) have to setup your own PHPMailer or any similar solution. Xampp "out of the box" is a pain and cannot send emails.

Re: Configuration required to send email from Apache/Lampp

PostPosted: 26. September 2017 01:18
by er_sachin_gupta
Hello
Thanks for your email.
Actually I have to use wordpress and Mantis Bug Tracker, Please suggest what i should use ? I do not know, doing it very first time.

Re: Configuration required to send email from Apache/Lampp

PostPosted: 26. September 2017 09:44
by Nobbie
Sorry, i dont know WordPress and neither Mantis Bug Tracker.