Solution: PHP / WordPress won’t send email on Debian

Nov022008 1:27PM — John

I got this issue when I tried to send email on my VPS using PHP, the app would report everything sent successfully, but nothing came. This fix is for Debian, but may work with any Debian-based Linux OS that uses the apt-get package manager, like Ubuntu.

It turns out that my VPS’s Debian install has been configured with exim4. I don’t know when I installed it, but it might have been included as a dependency somewhere down the line. For some reason PHP wasn’t feeling the love. So out with the exim4 and in the the postifx. I went in and used apt-get to install postfix. This automatically removed exim4, installed and configured postfix, allowing me to use PHP to send emails.

apt-get install postfix

Don’t do this if you’re actually using exim4 for your real email service, this is just a fix for people who need PHP to send email and use an external service like Gmail for their domain’s email.

Advertising

1 Comment

Amazing!

I’ve searched for a solution for a long time, but noone seemed to have the same problem. Or at least I couldn’t fint anything.

I, of course, thought it was something wrong with Wordpress or PHP, not the Debian base install. I think Exim4 is installed by default.

Anyway; this worked like a charm. Thanks!

Anders Milton vagnretur.nu
Dec142008

Leave a comment


Advertising