PHP mails not working with Wordpress multisite

September 4, 2014 3k views

Hello all,

I'm currently setting up a staging environment for my Wordpress websites and need some help regarding emails not being sent.

I've started by using the Wordpress one-click installation provided by DigitalOcean. Then I went ahead and created a Wordpress network to allow the installation of multiple sites. This is probably where it went wrong: now I'm not receiving any mails when I try to register users or fill in the "Forgot my password" form.

Guessing this has something to do with the PHP mail settings, I went ahead and opened the PHP.ini, but I couldn't figure out what was wrong. Then I tried to send an email using:

mail ('', "Testmail", "Test mail from my staging environment");

And noticed this also wouldn't work.

Does anybody know what's wrong here and how I can debug this?

Thanks in advance!

  • Did you install a MTA?

    If you use Postfix, you can try this via CLI:

    echo "Test mail from postfix" | mail -s "Test Postfix"

    Then you can check the postfix log to see whats going on.

  • I do have postfix installed, and figured out why I was not receiving e-mails. It seems like Gmail redirects my e-mails to the spam folder. Hotmail doesn't seem to receive any.

    I did try to "dpkg-reconfigure postfix" but couldn't figure out which settings to use. Do I need to use a wildcard to support all my multisite subdomains?


  • your domains have an SPF txt record? you need one or you will be send to spam folder, that at least talking about why some are been sent to spam folder.

Be the first one to answer this question.