msmtp working in SSH but not on php site

I have configured msmtp with my google apps account and got it to work when I send an email with php from SSH (Putty) like so:

php -r "mail('bill.lea@gmail.com', 'Test Email', 'Test email body');"

but when I try to send mail from within my php site it is not working. I am a newbie and maybe just overlooking something simple.

Can anyone help?

1 Reply

This blog post I wrote should solve all of your msmtp woes.

The main issue is that you're using your user configuration file and not the system wide one.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct