JonBlog
Thoughts on website ideas, PHP and other tech topics, plus going car-free
Fixing WordPress mail() problem on Fasthosts
Categories: PHP, Technical

I recently fixed a WordPress site that was having trouble sending mail from the popular contact form system, Contact Form 7. The site was running on a Fasthosts web server. Incidentally, I don’t recommend this hosting service; from what I can tell, they disable all the system() PHP calls, making it impossible to run backup plugins such as WP-DBManager. They’re also running PHP 5.2.6, even though the latest version of this branch is 5.2.17.

One other difficulty with Fasthosts is they require mail() calls to specify a recognised From address, to cut down on spam. Thankfully this can be set up for all WordPress wp_mail() calls by installing WP Mail Options. This fills in the mail() parameters required wherever wp_mail() is used, so if you’re having trouble with receiving mail from WordPress on a Fasthosts server, this might help. For reference, I filled in these options:

  • Email Priority (3)
  • Content-type (text/plain)
  • From (recognised email address on this hosting plan)
  • From Name (use a person or company name)
  • Sender (Return-Path) (same value as ‘From’)

You may not need all of those; I should imagine From and Sender are the critical ones.

2 Comments to “Fixing WordPress mail() problem on Fasthosts”

  1. Si says:

    Thanks – Fasthosts are a right pain. Widely recommended WP Mail SMTP didn’t work and I’d almost given up hope until I stumbled on your post.

Leave a Reply to Jon