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 specifically, but will work with any Debian-based Linux OS that use the apt-get package manager like Ubuntu.

It turns out that my VPS was configured with exim4, I don’t know when I installed it, but it was probably included as a dependency somewhere down the line, but PHP wasn’t feeling the love. So I went in and used apt-get to install postfix this automatically removed exim4 and installed postfix and configured it 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
Nov022008

Leave a comment


Advertising