WPForms Blog

WordPress Tutorials, Tips, and Resources to Help Grow Your Business

how to set up WordPress SMTP

How to Get WordPress Form Notifications Using the WP Mail SMTP Plugin

by Shahzad Saeed on Mar 2, 2017

Are you not receiving email notifications from your WordPress contact forms? You can fix this issue and start receiving notifications by setting up Simple Mail Transfer Protocol (SMTP) on your site. In this article, we’ll show you how to start receiving email notifications from WordPress contact forms using your Gmail, Yahoo or Microsoft Live/Hotmail/Outlook email account.

Why You’re Not Receiving Notifications

There can be a lot of reasons behind the lack of email notifications. Here are a couple of the most common:

  • Your WordPress hosting server is not configured to use the PHP mail function that WordPress uses to send emails that are generated by a contact form plugin like WPForms.
  • To reduce spam emails, your email provider often checks whether your email is originating from the location it claims to be originating from. For example, if your email server is yahoo.com, chances are your form notification won’t even make into the spam folder since they are sent out from a completely different server.

This is why we recommend using SMTP to send emails from WordPress instead of using the default PHP mail function. SMTP (Simple Mail Transfer Protocol) is an industry standard way to send emails that use proper authentication method to ensure email deliverability.

In this post, we’ll be using the free WP Mail SMTP plugin to send form notifications using your Gmail, Yahoo, or Live (including Live, Outlook, and Hotmail) email account.

Note: This tutorial’s method is less secure because it stores your email login and password in your WordPress dashboard. Other WordPress administrators have access to this. For a more secure option, we recommend setting up SMTP with SendGrid.

Step 1: Install the WP Mail SMTP Plugin

The first thing you need to do is to install and activate the WP Mail SMTP plugin. You can see this guide on how to install a WordPress plugin for step-by-step instructions.

Step 2: Enter Advanced Email Options

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

advanced email options in wp mail smtp

Here, you’ll be asked to enter your From Email. This is the email address that your form’s email notification should be sent from.

Note: Make sure to enter the same email address you will be using to send SMTP emails (your Yahoo, Gmail, or Live email address). Additionally, in WPForms, the same email should be used in the Send From setting in your form notifications.

If you want, you can enter the From Name as well. If you leave it blank, the from name in your form’s email notification will be shown as WordPress.

Then, you’ll need to configure the Mailer settings. Choose Send all WordPress emails via SMTP.

You can also enable return path by selecting the Return Path checkbox. The return path is the address to which any undeliverable message notices, usually known as bounces are sent. By enabling the return path, those emails will be sent to the email address you entered in the From Email field above.

When you’re done, click Save Changes.

Step 3: Enter SMTP Options

After saving your Advanced Email Options, just scroll down the page to see SMTP Options.

Each email provider requires slightly different SMTP Options configurations. Let’s take a look at how to configure it for different email providers including Gmail, Yahoo and Live/Hotmail/Outlook.

Gmail SMTP Options

If you want to send notifications using your Gmail account, you can use the below SMTP options.

gmail smtp options in wp mail smtp

  • SMTP Host: smtp.gmail.com
  • SMTP Port: 465
  • Encryption: Use SSL encryption
  • Authentication: Yes: Use SMTP authentication.

Then, enter your Gmail username and password and click Save Changes.

Yahoo SMTP Options

If you want to send notifications using your Yahoo email, you can use the below SMTP options.

yahoo smtp options in wp mail smtp

  • SMTP Host: smtp.mail.yahoo.com
  • SMTP Port: 465
  • Encryption: Use SSL encryption
  • Authentication: Yes: Use SMTP authentication.

Then, enter your Yahoo username and password and click Save Changes.

Live, Hotmail or Outlook SMTP Options

If you want to send notifications using your Live, Hotmail or Outlook email, you can use the below SMTP options.

hotmail smtp options in wp mail smtp

  • SMTP Host: smtp.live.com
  • SMTP Port: 587
  • Encryption: Use TLS encryption
  • Authentication: Yes: Use SMTP authentication.

Then, enter your Live, Hotmail or Outlook username and password, and click Save Changes.

Step 4: Enable Less Secure Apps

In order to configure SMTP on your WordPress site, you may need to enable less secure apps on your email account. Let’s take a look at how to enable it on different email providers.

Enable Less Secure Apps in Gmail

To enable less secure apps on Gmail, log in to your Gmail account. Then, go to less secure apps by clicking this link. Next to Access for less secure apps select Turn on.

gmail less secure apps to enable smtp

Enable Less Secure Apps in Yahoo

To enable less secure apps on Yahoo, log in to your Yahoo account. Then, click here to go to account security settings. Now turn on “Allow apps that use less secure sign-in”. After turning it on, the button color will be turned to green.

yahoo-less-secure-sign-in

Enable Less Secure Apps in Live, Hotmail or Outlook

If you’re using Live, Hotmail or Outlook email, you actually don’t have to enable less secure apps on your account to configure SMTP on your site.

Step 5: Send a Test Email

After configuring your SMTP options and enabling less secure apps on your email account, you’ll now need to send a test email to ensure that your SMTP authentication is a success.

To send a test email from your WordPress site, scroll down the WP Mail SMTP settings page. You’ll now see the Send a Test Email section.

You can enter your email address in the To field and click Send Test to generate a test email.

send test email in wp mail smtp

If the test email is successfully being sent, you can see bool(true) in the success message.

Finally, there are a couple more things you’ll need to keep in mind when you’re configuring SMTP on your site to receive WPForms notifications to your email without any trouble.

  • Be sure to set the same From Email on both the WP Mail SMTP settings and WPForms notification settings.
  • If you’re using Yahoo email, likely you won’t receive the test emails and form notification emails instantly. It may take about 5 to 10 minutes for them to arrive in your inbox.
Note: Sometimes for security reasons Gmail may automatically block the sign-in used by SMTP, even with less secure apps enabled. When this happens, your recovery email address will be sent an email with a sign-in attempt warning (see below). To remove this block, you’ll need to click the Review Your Devices Now button and follow the instructions to let Google know this was a legitimate login attempt.

enable smtp with gmail

That’s it! You’ve successfully configured SMTP on your WordPress site. You’ll now start getting notifications from your WordPress forms.

There are lots of different ways to configure SMTP on your WordPress site to get the form notifications. You can take a look at a few more ways to configure SMTP on your site.

What are you waiting for? Get started with the most powerful WordPress forms plugin today.

If you like this article, then please follow us on Facebook and Twitter for more free WordPress tutorials.

Comments

  1. How about enabling multiple email addresses?

    I use this plugin too but I have a dozen email addresses I’d like to set up forms for.

    They’re all on the same mail server and domain but they’ll each have different mail inboxes and passwords.

    1. Hi Darren,

      When you say you’d like to set up forms for those other email addresses, do you mean you want email notifications to be sent to different email addresses depending on the form?

      We recommend just using one email for your site as the “From Email,” since this ensures the best deliverability, but you can set up notifications to go to other email addresses using the “Send To Email Address” field.

      If you want to be able to reply to the email notification and reach a different email address, you can enter that address in the “Reply-To” field.

      Hope that helps! Please do reach out to support if you have any questions about customizing your notifications. WPForms has a ton of features to set up custom email notifications, so there’s sure to be a way to set yours up to work for your needs 🙂

  2. I have a client who’s been using this plug-in with no problem since 2015 in conjunction with Office365. It quit working about 2 months ago.

    The current scenario (with plugin turned off) is that email is delivered to any non-domain email address, but not to company email.
    so me@gmail.com works fine but any@company-domain.com is not delivered.

    If I turn the plugin back on, no mail is delivered.
    I also tried the other go-to SMTP plugin with the same results.

    We’ve been waiting 3 weeks to hear back from Office365 support,
    so this is as close as I’ll get to a rant, but working with Microsoft is like trying to get an audience with the Wizard of Oz

    It’s very frustrating as the owner immediately to place blame on the webguy (that’s me)

    1. Hi Bryan,

      I apologize for the frustrations you’ve encountered with this!

      Email providers are increasingly cracking down on emails in an effort to block spam, and are constantly changing their methods in these efforts — and this unfortunately often impact WordPress emails. That being said, I’m not aware of any reason why any SMTP plugin would suddenly stop working, unless your hosting provider has made changes (this can certainly result in the plugin not being able to function properly).

      Would you be willing to contact us in support? From there, we can troubleshoot within your site and try to get this sorted. Thanks! 🙂

      1. I’m having the same issue as BRYAN THOMPSON (who commented above) where my client has stopped receiving emails to their Office 365 inbox (same domain email address). The emails are instead being dumped into his spam folder. Have there been any updates or solutions to this issue?

      2. Hi Ben,

        Email providers are constantly increasing their efforts to block spam, and cause emails to suddenly stop getting delivered even when they were working before — but an SMTP plugin should allow you to circumvent this.

        If you’d like to check out all of our SMTP recommendations, you can check out this article. If you give one of those SMTP options a shot and encounter any issues, could you please let us know in support?

        Thanks! 🙂

  3. Hello

    My wp smtp was working normally more now the message appears when doing test:

    Bool (false) SMTP Could not authenticate

    1. Hi Johnatan,

      We’d be happy to help! The best way for us to start troubleshooting an issue like this is to log into you site to do double check settings and run tests. When you get a chance, could you contact us in support?

      Thanks! 🙂

    1. Hi Christy,

      As this article mentions, this has unfortunately become a fairly common issue. The solution described here is a great option, and we also have quite a few other SMTP recommendations here if any of them feel like a better fit.

      If you give one of the SMTP options a shot, please let us know if you have questions along the way! 🙂

  4. I did all these steps but I’m still getting an error message. Is there anything else that can be blocking me from working?

    1. Hi Reyn,

      Sometimes SMTP plugins can run up against site-specific issues, such as server configurations – but we’d be happy to help you get that sorted! Could you please contact us in support with any details that might help us troubleshoot?

      Thanks! 🙂

    1. Hi Celia,

      Great question. For most people, doing this is completely fine and will never create an issue – Gmail is essentially warning you that you’re allowing a third-party (in this case, your SMTP plugin) to have access that they normally wouldn’t.

      However, this is not a requirement of all SMTP plugins so if you’re concerned there are absolutely other options you can consider. For Gmail, for example, you can use Gmail SMTP — this doesn’t require you to enable less secure apps, because it uses Google’s API to be more secure. There are also several other options described in this doc (the other more secure options are listed under ‘Plugins Requiring a Subscription’).

      Essentially, options like this will be more secure but also a bit more complex to set up. If you check out that doc, though, you’ll see tutorials for each of the SMTP plugins discussed!

      I hope this helps! If you’d like more details, please feel free to get in touch with us in support 🙂

  5. Hello

    I have a client who is using an AOL account which they wish me to set up to receive book-in requests using WPForms , i followed the steps but used the AOL configuration instructions-

    SMTP Outgoing Server Address: smtp.aol.com Set the port to 587
    SMTP Username: YourUsername@aol.com (or @love.com, @games.com, etc.)
    SMTP Password: password you use to login to Mail

    However i am still get an failed test email, any thoughts on what it could be ?

    1. Hi Nicola,

      Sorry for the trouble! It sounds like you have those settings set up properly, so there are a couple options for the next step:

      1) You could contact your host to make sure that they aren’t blocking SMTPs by default (for example, some hosts need to be asked to open the port you need)
      2) You could contact us in support and we can help you troubleshoot. We’d be happy to help 🙂

  6. I have set up 2 forms, one with WordPress Forms and one with CForm Builder. I cannot get the forms to send to my AOL email. I have had others try to send me a test form, I get nothing. They get the auto response for sending. I was able to get the test email when doing the form set up, but in trying to even send myself a test email, I get nothing. Can you please post the settings for using AOL? Maybe I don’t have something correct. I have the SMTP activated.

    1. Hi Dana,

      Great question. Here’s what I found on an AOL support page:

      Host: smtp.aol.com
      Port: 587
      Encryption: TLS

      Also be sure to set Authentication to ‘Yes: Use SMTP authentication’, then enter your AOL email’s username and password.

      If you give that a shot and still run into issues, could you please contact us in support? From there we can collect more details and help you troubleshoot.

      Thanks! 🙂

  7. after activating the plugin, i get the following error:

    I am wondering if this is related to my hostmonster account and port 465 being open.

    The SMTP debugging output is shown below:
    2017-06-29 23:16:59 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array (
    )
    2017-06-29 23:21:14 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Network is unreachable)
    2017-06-29 23:21:14 SMTP ERROR: Failed to connect to server: Network is unreachable (101)
    2017-06-29 23:21:14 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    1. Hi Michael,

      Some hosting providers do block certain ports by default, so it’s worth checking with them to be sure. When we see this error in the SMTP test, that’s often the cause.

      If you reach out to your host and they say the port you need is open, the next thing I’d check is whether Gmail itself is blocking the SMTP. To do this, double-check that less secure apps are enabled (under Step 4).

      If you’re still stuck after giving these a shot, please feel welcome to contact us in support (you can use the left button on that link if you have an account, and the right button if not).

      I hope this helps! 🙂

  8. Great article.
    I have followed the guidance in the article, test email sent successfully and received in the “to” email address successfully. But still, I don’t receive any notification from the wordpress. Is there anything I missed?

    Thanks.

    1. Hi Ade,

      Most often when we see the test email delivering successfully but form notifications still not coming through, it’s has to do with the notification settings. If you could open your form builder and go to Settings > Notifications, there are a couple of things to check:

      1) In the Send To Email Address box, please check that if you have more than one email address they are comma separated.
      For example: {admin_email}, test@test.com

      2) Then, please check that the From Email is the same as the email you set up the SMTP with. This is key, as the SMTP can only work by sending through that one email address.

      In case it helps, you can use the Reply-To box to hold any email address (such as the Smart Tag for the email entered in the form), but the From Email must always match the email address in the SMTP.

      I hope this helps! 🙂 If these don’t do the trick, could you please contact us in support?

    1. Thanks so much, Christina! Glad it helped you out 🙂

      We’re always publishing new tutorials like this, so feel free to follow us on Twitter or Facebook to get updates if you’d like.

    1. Hi Marvin,

      We’re not aware of any SMTP issues with Hostgator, but if you have any concerns I’d suggest reaching out to them directly for the most up to date information 🙂

      We can also take a look on our end — if you’d like us to do this, please do Step 5 above to send a test email and then share the debug log with us (this will appear on the page immediately after you send the test email). This log helps us get a pretty good idea of where the issue lies, and you can copy it either into a forum post (for Lite users) or a ticket (for Pro users).

      Thanks! 🙂

      1. The test email went succesfully and received by a yahoo email, this is when I used my SMTP hostgator.

        But when I used and field up a form and submit, it sent the email confirmation to the user(yahoo email), but went to the spam folder, and the email included this error and below it are the form data, and it went to the spam folder:

        This is the mail system at host gateway36.websitewelcome.com.

        I’m sorry to have to inform you that your message could not
        be delivered to one or more recipients. It’s attached below.

        For further assistance, please send mail to postmaster.

        If you do so, please include this problem report. You can
        delete your own text from the attached returned message.

        The mail system

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.