How do I configure a WordPress SMTP plugin?

Overview

WordPress has several SMTP plugins you can use to force any FROM address you like. This is important for two major reasons:

  • It allows you to send email directly through your mail server as opposed to the web server. This helps to prevent issues with Sender Domain Policy and Spoofing.
  • It allows you to send email FROM another email host. For example, you can use your GMAIL address as the FROM email instead of your DreamHost address

One popular plugin option is shown below with its recommended settings.

WP Mail SMTP

  1. In the WordPress dashboard, click 'Plugins > Add New' in the left pane.
  2. Search for wp-mail-smtp. It can also be found here.
  3. Click the Install button, then Activate. 
  4. After it's installed and activated, navigate to the 'Plugins' page in your WordPress dashboard.
    01 WP Mail SMTP.png
  5. Click the 'Settings' link under the plugin.
    02 WP Mail SMTP.png
  6. Fill in the following fields:
    • From Email - Enter the email you wish to send FROM
    • Force From Email - Check this box
    • From Name - Enter a name you'd like to appear as being sent FROM
    • Force From Name - Check this if you wish to force the FROM name
    • Mailer - Choose 'Other SMTP'
    • Return Path - Check this box
  7. Scroll down to the 'Other SMTP' section. Make sure to toggle the 'Authentication' button.
    • SMTP Host - smtp.dreamhost.com
    • Encryption - Use TLS encryption
    • SMTP Port - 587
    • Username - Enter your DreamHost email address
    • Password - Enter your email address password
  8. Click the Save Settings button.

Your form will now send FROM the email you entered above.

The plugin mentions that you should add the following lines to your wp-config.php file.

define( 'WPMS_ON', true );
define( 'WPMS_SMTP_PASS', 'your_password' );

Do not add these. Adding these will prevent the plugin from sending.

Testing the plugin

Scroll to the top and click the 'Email Test' tab. Click the Send Email button to test. You should see it was sent successfully.

Alternative plugins

There are several other SMTP plugins you can use to send email. After logging into your WordPress site, select 'Plugins > Add New' in the left pane. You can then search for the term 'SMTP' to view other options.

Allowing GMAIL to send from your mail application

The following guide shows how to create a Google Web Application which is needed to send email using a Gmail address.

If you're using your GMAIL address to send via SMTP, you must first allow your application access to your GMAIL address. If you do not do this, your email will not authenticate and not send. View the following article for details:

See also

Did this article answer your questions?

Article last updated PST.