WP Mail SMTP

This WordPress plugin reconfigures the wp_mail() function so all mail from your blog can be sent by SMTP instead of using PHP’s mail() function. The plugin also adds an Options > Email page which allows you to configure the settings from the admin interface of your site.

Troubleshooting

Could not connect to host

If you see an error like “Failed to connect to server”, the plugin is working, PHP cannot connect to the server. Look at the whole error message and investigate from there. Check your php.ini settings around fopen() permissions, check your SMTP host is correct, or contact your server administrator.

If your error is “Cannot connect to host”, please look for support elsewhere, please do not ask for support here. These questions have been asked many times before, please search the history. The plugin is working, the issue lies elsewhere.

No email from plugins?

If you’re using plugins to send email, these plugins will ignore the SMTP settings if they call PHP’s mail() function directly. If you see the function mail() and not wp_mail() in the plugin’s source, that’s the problem. You should be able to simply add wp_ in front of the existing mail command and it will probably work! (Insert lawyer-speak no warranty blurb here!)

Translatiion

If you would like to translate this plugin, you can download the POT file here.

Other Problems

Try sending a test email. The error message should help you detect your problem.

Multi Site

This plugin was compatible with WordPressMU back in the day. I recommend if using the plugin on a multi-site setup, put your settings in wp-config.php and then disable the admin menu. This means you can set options once that will apply to all sites in your network. Allowing each site to set their own options is also possible, but might lead to unexpected results, and potentially, many more support requests.

Security

The password is displayed in plain text on the admin page because it must be stored in plain text in the database. WordPress needs the password when it connects to your mail server, and needs it in plain text. There is no simple workaround to this. Changing the input field to type=password would only make it look like it was “secure” when in fact the password would still be in plain text in the page source code.