Last Updated on December 28, 2022 by Steve
This article is the second in a two part series tutorial on how to set up WP Mail SMTP Plugin and send emails from WordPress. Be sure to check out the first article, How To Send Email From WordPress Using WP Mail SMTP Plugin, if you need introduction to SMTP and why its needed. The WP Mail SMTP plugin is one of the most popular available for the use of sending emails from WordPress. In this second part of this two part series we will discuss the configuration of this plugin to send emails from WordPress via SMTP.
Install WP Mail SMTP
Step 1: Scroll down to Plugins and select Add New
Step 2: Type WP Mail SMTP in search box, select plugin and activate
Step 3: Once the plugin is installed and activated, a new menu will show up WP Mail SMTP. Navigate to it and select Settings tab
Step 4: Select Other SMTP , fill out all the fields and click save. The information needed to fill out these settings can be provided by whoever hosts your SMTP email server.
SMTP Settings Overview
Unlike our other options which use APIs to allow this setup information to be stored with Google, SendGrid, or Mailgun, the Other SMTP option in WP Mail SMTP requires this setup information to be stored directly on your site.
Below, we’ll go into more detail on each of the fields required to set up an “Other SMTP” option in WP Mail SMTP.
This is the the address to the host’s SMTP server.
The most common ports are 587 and 465, however hosts can and do change these. It’s not uncommon for web hosts to block these ports, so before you begin it’s always good to verify with your web host that the required port is open. If closed, most of the time your hosting provider can open it for you.
SSL and TLS are the most widely used encryptions. If your email provider offers both, we recommend TLS. It is worth noting that usually TLS encryption is used with port 587, while SSL is used with port 465.
Modern email providers require authentication. Disabling it may be needed for local development or other edge case scenarios, however most providers need this turned on.
Your username is typically your email address for the email provider; e.g. firstname.lastname@example.org or email@example.com. Some providers such as AOL require the non-email format; e.g. if your email is firstname.lastname@example.org your username would be john_doe.
This is your email account password. Please note although the password is not viewable in the settings, it is still stored in the database as plain text. This is required since establishing the SMTP connection requires sending the password in plaintext.
With this in mind, we highly recommend you set up your password in your WordPress configuration file,
wp-config.php for improved security. You can easily add this code using SFTP or file manager if using cPanel.
Here’s the code you’ll need to add:
define( 'WPMS_ON', true ); define( 'WPMS_SMTP_PASS', 'your_password' );
Then, you’ll just need to replace
your_password with your actual password. When you save the file and refresh your SMTP settings page, you should see the Password field is now slightly greyed out and disabled since it’s no longer being used.
SMTP Settings for Popular Providers
When filling out the fields mentioned above, the settings you’ll need will depend on your email provider.
Here are the SMTP settings you’ll need for the most popular email providers:
Port: IMAP Port: 993 if using POP3 Port: 995
Username: Your cPanel email address (e.g. email@example.com)
Password: Your cPanel email password
IMAP, POP3, and SMTP require authentication
Gmail / G Suite SMTP Settings
Port: 587 (or 465 using SSL encryption)
Username: Your Gmail account email address (e.g. firstname.lastname@example.org)
Password: Your Gmail account password
Please note we recommend using the built in Gmail integration instead of the SMTP method. If you use SMTP, don’t forget to enable less secure apps.
Outlook.com SMTP Settings
Username: Your Outlook.com account email (e.g. email@example.com)
Password: Your Outlook.com account password
Office 365 SMTP Settings
Username: Your Office 365 account email
Password: Your Office 365 account password
Hotmail SMTP Settings
Username: Your Hotmail account email (e.g. firstname.lastname@example.org)
Password: Your Hotmail account password
Yahoo Mail SMTP Settings
Username: Your Yahoo Mail account email (e.g. email@example.com)
Password: Your Yahoo Mail account password
Please note you will need to to enable less secure apps.
AOL SMTP Settings
Username: Your AOL screen name (e.g. john)
Password: Your AOL account password
That’s how easy it is to set up this plugin. Hope you found this article helpful.
Subscribe To Our Newsletter
Be the first to know about our latest posts, tips, tricks, promotions, sales and tutorials on WordPress! Delivered to your inbox once a week, no spam!