Reputation: 1995
I have an exim installation in a non-standard path.
How can I configure php so that mail() will use it?
Upvotes: 1
Views: 6334
Reputation: 1060
After guarantee that exim4 is really running without any problem.
sudo service exim4 statusor
sudo /etc/init.d/exim4 statusNote.: Pay attention to result at the command line. It'll warn you, if it has any problem.
* Stopping MTA for restart * Restarting MTA ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken
You may edit the file
/etc/php5/apache2/php.iniand add the line
sendmail_path = "/my_custom_path/exim -t"without the option -i which will cause problems.
So, type that to test,
echo "Testing." | mail -s Test [email protected]instead of test with PHP function. There are so many things (firewall, network: subnets and security groups, PHP settings) that can cause problems to your routine that's better guarantee exim4 works.
Upvotes: 2
Reputation: 1995
The solution is to change the value of the "sendmail_path" variable in php.ini:
sendmail_path="/my_custom_path/exim -t -i"
exim is compatible to sendmail when it comes to command line arguments
Upvotes: 3