MSMTP Configuration - Can't send through php mail()
When I try to use php's mail() function, it doesn't work. I updated the php.ini file and sendmail_path to the msmtp location and it resorts back to the /usr/sbin/sendmail which is confusing. I restarted both apache and rebooted the server to no avail.
As I see it, there's a loose configuration option for php.ini's sendmail_path somewhere that still points to /usr/sbin/sendmail instead of /usr/bin/msmtp.
Does anyone have any thoughts or is there anything I can post that would help?
Travis
5 Replies
Loaded Configuration File =>
additional .ini files parsed =>
They tell you what ini files you've loaded.
Thanks for the recommendation. I found out that another php file was the primary one - /etc/php5/cli/php.ini (instead of /etc/php5/apache2/php.ini).
This fixed my command line problem of being able to send mail. But creating a php script that sends an email still fails. Is there a php config setting that disables scripts from using the mail() function?
Some googling didn't result in any satisfactory answers/leads. The debug simply says your server might not be configured to send mail using this method.
Thanks!
Travis
Thanks for the response. According to both logs there is no record of me having requested to send a message through a php script.
Here's what I have in mail.log:
mail() on [Command line code:1]: To:
Here's what I have in msmtp.log:
Dec 01 23:55:07 host=smtp.gmail.com tls=on auth=on user=
Both of these are from calling the php mail function from the command line. There is some kind of disconnect for the script and I don't know what it is or where to look for it.
Thoughts?
Travis