Email Deliverability, PHP, Webmaster, Wordpress

PHP Mail Fail on Windows IIS Server

Leave a Reply

Over the years I’ve transferred a number (too many) PHP websites to Windows servers running PHP (or have had to install PHP apps on a windows server, etc.). One of the biggest problems I always run into when using PHP on a Windows IIS Server is that the PHP Mail Function doesn’t work.

The solution is to change from using the PHP Mail Function to using Authenticated SMTP delivery. In essence, you’ll set up your web app to act like Outlook or Thunderbird to connect to an emailbox directly. This app obviously won’t download any emails; just send them.

You can search for “PHP SMTP email” to get some good solutions to how to handle this with a Pear script.

If you’re using WordPress, though there’s a very simple WordPress Plugin called WP-Mail-SMTP that does all the hard work for you. All you need to do is enter your server information and select your settings.

I just used it, and it took 5 minutes to setup and test.

Leave a Reply

Your email address will not be published. Required fields are marked *