KnowledgebaseHow can we help you?

Settings for sending Emails in WordPress through SMTP

Login into WordPress.

You will now need to install and activate the WP Mail SMTP plugin.

Upon activation, you need to visit Settings » Email to configure the plugin settings.

WP-Mail-SMTP Settings

First you need to enter the email address you just created. After that you can add a from name, this will be used as the sender name.

If you do not add a from name, then the plugin will use the default WordPress.

Next, you need to choose the mailer. Go ahead and click on the ‘Other SMTP’ option to select it.

Choose Mailer

After that, you need to check the box next to ‘Return Path’ option. This option sets the return path to match the sender email address. If you leave it unchecked, bounced messages and non-delivery receipts will be lost.

Next, you need to set up SMTP options.

SMTP settings

First you need to enter your SMTP host and port. You can obtain this information from your hosting provider. Typically, SMTP host is mail.yourdomain.com (replace yourdomain.com with your own domain name). For SMTP Port 465 is commonly used.

Next, you need to choose encryption. Most WordPress hosting companies support SSL and TLS. We recommend using TLS option when available.

After that turn on the authentication toggle and provide your SMTP username and password. Normally, your email address is also your SMTP username.

Your password is stored as plain text, which is not safe. Don’t worry, we will show you how to make more secure later in this article.

Don’t forget to click on the save settings button to store your changes.

Testing Your SMTP Settings

Now that you have set up WP Mail SMTP to send emails, let’s test if everything is working fine. On the plugin’s settings page, click on the ‘Email Test’ tab.

Send test email

You need to provide an email address where you would like to receive test email. This could be any valid email address that you can access. After that click on the Send Email button to continue.

WP Mail SMTP will now send an email message using the SMTP settings you entered earlier. You will see a success message when email is sent successfully.

Securing Your Email Password

You may need to enter your email account password in WP MAIL SMTP settings. This password is normally stored as plain text which is unsafe.

However, the plugin also provides you an option to make it more secure. To do that, you will need to add some code to your wp-config.php file.

First you will need to connect to your website using a FTP client or File Manager app in cPanel. Once connected, you will find your wp-config.php file in the root folder of your website.

You can edit this file using any plain text editor like Notepad or TextEdit.

Locate the line that says ‘That’s all, stop editing! Happy blogging’ and add the following code just before it.

   
1 define( 'WPMS_ON', true );

2 define( 'WPMS_SMTP_PASS', 'your_password');

Don’t forget to replace ‘your_password’ with your actual SMTP password. After that, save and upload your wp-config.php file back to server.

You can now visit your WordPress admin area and go to Settings » WP Mail SMTP page. Scroll down to the SMTP options section and you will see password field is now disabled.

SMTP password disabled

Troubleshooting WordPress Email Issues

The most common reason for errors in sending emails using SMTP is incorrect SMTP host or port. Make sure that you are entering the correct host and port settings provided by your hosting provider.

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:

Gmail / G Suite SMTP Settings

Host: smtp.gmail.com
Port: 587 (or 465 using SSL encryption)
Username: Your Gmail account email address (e.g. john@gmail.com)
Password: Your Gmail account password
Encryption: TLS

Outlook.com SMTP Settings

Host: smtp-mail.outlook.com
Port: 587
Username: Your Outlook.com account email (e.g. john@outlook.com)
Password: Your Outlook.com account password
Encryption: TLS

Office 365 SMTP Settings

Host: smtp.office365.com
Port: 587
Username: Your Office 365 account email
Password: Your Office 365 account password
Encryption: TLS

Hotmail SMTP Settings

Host: smtp.live.com
Port: 587
Username: Your Hotmail account email (e.g. john@hotmail.com)
Password: Your Hotmail account password
Encryption: TLS

Yahoo Mail SMTP Settings

Host: smtp.mail.yahoo.com
Port: 465
Username: Your Yahoo Mail account email (e.g. john@yahoo.com)
Password: Your Yahoo Mail account password
Encryption: SSL

AOL SMTP Settings

Host: smtp.aol.com
Port: 587
Username: Your AOL screen name (e.g. john)
Password: Your AOL account password
Encryption: TLS

That’s it! By using WP Mail SMTP, you’ll be able to get your site’s email delivering successfully.

 

Make sure that you select the correct encryption method. Usually SSL works on most environments, but we recommend that you check with your web host if your emails are not getting delivered.

Was this answer helpful?

Also Read



+91 9569505379 (Till Covid -19 Outbreak)
10:00 am to 7:30 pm IST Monday to Saturday
Live Chat, Email and Tickets are available 24/7

HostAdvice Great Uptime Award for Gen X Web Hosting
Gen X Web Hosting Reviews