InMotion Hosting Support Center

When sending email, it is usually a good idea to send using SMTP authentication. Authenticating with the server will prevent issues such as your message being marked as outgoing spam when being sent. In this article, we will show you how to configure SMTP authentication within WordPress. This guide uses the WP Mail SMTP plugin, we also have a guide on how to use the Easy WP SMTP plugin in WordPress.

In this tutorial:

Install the WP Mail SMTP WordPress plugin

  1. First, log into your WordPress admin dashboard.

  2. Once logged in, hover over Plugins and click on Add New. On this page, enter WP Mail SMTP into the search field and press the Enter key.

  3. You should now see a list of your search results. As you have searched for the exact file name, the WP Mail SMTP plugin should be the first result. To install it, click Install Now.

  4. WordPress will now handle the download and installation of the WP Mail SMTP plugin for you. Once complete, be sure to click Activate Plugin to activate it.

Configuring WordPress to send using SMTP authentication

Now that you have installed the WP Mail SMTP plugin, you will just now need to configure it. In the following steps, we will be configuring the SMTP settings for the WP Mail SMTP plugin.

  1. On the left side navigation menu of your WordPress admin dashboard, hover over Settings and click on Email.

  2. Next, scroll down to the SMTP Options section.

  3. Within the SMTP Options section, set Authentication to Yes.

  4. Next up is the Username and Password fields. In these fields, enter the email address that you will be sending from within the Username field, as well as the password for that account within the Password field.

  5. Now that you have entered the proper authentication information, click the Save Changes button.

  6. If you want to test your settings, you may go to the Send a Test Email section and enter an email address that you want to send to, then click the Send Test button.

Congratulations! You have now configured WordPress to use SMTP authentication when sending mail on the server.

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2017-09-13 8:01 pm

Just as a note, this may or may not work depending the version of PHP you have active. I tested this plugin with two identical Wordpress installs on the same server, one running PHP5.4 and one running PHP7.

PHP5.4: Works as shown up above in the tutorial.

PHP7: You need to change the "localhost" portion to your server mail address (e.g. biz###.inmotionhosting.com ), port to 465, and check "Use SSL". It should work after that. If you use the localhost/25/noSSL as the tutorial says, you'll get an SMTP Authentication error.

From the research I've done, the suspected reason is that PHP7 changed how it handles SSL connections and the plugin hasn't been updated to reflect that.

n/a Points
2017-06-22 5:31 pm

Thank you for posting the solution.  I created a new account in Cpanel and plugged in the info as suggested and now Wordpres sending out emails via SMTP.  SOLVED!

n/a Points
2017-06-15 7:13 pm

My test didn't work either. Are "localhost" and port 25 correct? This is just the first part of the test response:

The result was:

bool(false)

The full debugging output is shown below:

object(PHPMailer)#14110 (76) {
  ["Version"]=>
  string(6) "5.2.22"
  ["Priority"]=>
  NULL
  ["CharSet"]=>
  string(5) "UTF-8"
  ["ContentType"]=>
  string(10) "text/plain"
  ["Encoding"]=>
  string(4) "7bit"
  ["ErrorInfo"]=>
  string(43) "SMTP Error: Could not connect to SMTP host."
  ["From"]=>
  string(18) "jane@smallbones.ca"
  ["FromName"]=>
  string(4) "Jane"
  ["Sender"]=>
  string(0) ""
  ["ReturnPath"]=>
  string(0) ""
  ["Subject"]=>
  string(41) "WP Mail SMTP: Test mail to jane@airnet.ca"
  ["Body"]=>
  string(68) "This is a test email generated by the WP Mail SMTP WordPress plugin."
  ["AltBody"]=>
Staff
2,858 Points
2017-06-16 10:39 am
As the comment above, you are getting a "Could not connect to SMTP host" message. I recommend checking your SMTP settings. You can view your email settings in cPanel at any time.
2017-05-11 11:02 am
After following these setup instructions I am getting the error below. I have confirmed that the host is localhost and port is 25. I have also confirmed the login credentials work via webmail for the account being used. What do you suggest?

Test Message Sent
The result was:
bool(false)
The full debugging output is shown below:
object(PHPMailer)#1566 (76) {
["Version"]=>
string(6) "5.2.22"
["Priority"]=>
NULL
["CharSet"]=>
string(5) "UTF-8"
["ContentType"]=>
string(10) "text/plain"
["Encoding"]=>
string(4) "7bit"
["ErrorInfo"]=>
string(43) "SMTP Error: Could not connect to SMTP host."
["From"]=>
string(19) "Info@aohmassage.com"
["FromName"]=>
string(10) "AOHMassage"
["Sender"]=>
string(19) "Info@aohmassage.com"
["ReturnPath"]=>
string(0) ""
["Subject"]=>
string(47) "WP Mail SMTP: Test mail to red.garuda@gmail.com"
["Body"]=>
string(68) "This is a test email generated by the WP Mail SMTP WordPress plugin."
2017-05-11 11:04 am
I should add that even if I turn off authentication I get the same error message. Domain is aohmassage.com
Staff
30,194 Points
2017-05-11 12:17 pm
Since you are getting a "Could not connect to SMTP host" message, I recommend checking your SMTP settings. You can view your email settings in cPanel at any time.

Thank you,
John-Paul
n/a Points
2017-01-11 4:39 am

username and passwords are your cpanel login details. it'll work . 

n/a Points
2016-12-07 1:53 am

Repeating my post (since it wasn't posted) and revising my question:

Is there a way to reconfigure the SMTP settings (username and password) through the php files. If yes, which specific files holds the assignment of the values for the contants, specifically the host, username and password?

Thank you!!

Staff
13,791 Points
2016-12-07 8:33 am
This is a third party plugin and it likely stores the data in the database. You would need to have the plugin installed before this tutorial would be applicable.
n/a Points
2016-11-23 11:18 am

I am trying to send E-Mails with WP SMTP. I have configured this way:

Mailer: Send All mails by SMPT

Return Path: Unchecked

SMTP Host: smtp.gmail.com

SMTP PORT: 25

Encryption: No

Authentication: Yes

Username and password are valid, I have double checked

 

I am trying to send a test email and it is giving 405 Not Found error after loading for somewhere 30 seconds.

Please guide what could be the problem and effective solution.

Thanks in advance

Staff
40,163 Points
2016-11-23 11:38 am
Hello Rushi,

Since you're using a third party server to deliver the email you will need to look at their information in regards to how it should be set up. The guide provided here does a good job showing you both ways that Gmail's SMTP server can be used to deliver email.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.
n/a Points
2016-11-24 1:09 am

Hey,

 

Thanks for sharing the link. I will try this one

n/a Points
2016-11-22 5:57 pm

I have enabled WP Mail SMTP on our site.  But, clicking the SEND button takes 25+ seconds to send the email.  Is there a setting or a way to change this so it is a faster process?  Thanks!

n/a Points
2016-09-28 10:20 am

Not working. I get the following message after the Test Mail:

 

est Message Sent

The result was:

bool(false)

The full debugging output is shown below:

Staff
40,163 Points
2016-09-28 2:32 pm
Hello Teo,

Sorry for the problems with sending emails from WordPress. We would need more information about your installation to investigate the issue. Please provide domain name, email address used, WordPress version, plugin version, and steps you've used to duplicate the problem. If you want the issue handled privately, then please submit a verified support ticket to our live support team.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.
n/a Points
2016-08-23 1:08 am

This solution is not wroking. I had tried this but i have to log in as admin and then after email works.

Staff
13,791 Points
2016-08-23 8:23 am
Are you saying you have to log into WordPress as the admin user? Yes, since you are installing a third party plugin you have to log into WordPress as the admin user. Otherwise, you will not have the correct privileges.
n/a Points
2016-08-29 11:46 pm

What is the alternate way to send emails without login as admin

Staff
9,867 Points
2016-08-30 8:18 am
Yes, you could accomplish this with an alternate service like PHPList or MailChimp.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

20 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!