Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Fix WordPress Not Sending Email Issue

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Fix WordPress Not Sending Email Issue

One of the most commonly asked questions on WPBeginner is how to fix WordPress not sending email problem. Many of our beginner level users ask us why their Gravity Forms or WPForms is not sending emails, or why they are not seeing any WordPress notifications. In this article, we will show you how to fix WordPress not sending email issue.

Fixing email issues in WordPress

Why You Are Not Getting Emails from Your WordPress Site

The most common reason for this is that your WordPress hosting server is not configured to use PHP mail() function.

Another reason is that many email service providers use a variety of tools to reduce email spam. These tools often try to detect that an email is originating from the location it claims to be originating from.

Sometimes the email is sent out by WordPress, but it never even makes into spam folder of the destination. This is why we recommend not using WordPress to send your email newsletter.

That’s why we recommend using SMTP to send emails in WordPress. SMTP (Simple Mail Transfer Protocol) is the industry standard for sending emails. Unlike PHP mail function, SMTP uses proper authentication which increases email deliverability.

There many different SMTP services available, but in this article we will show only two that we recommend: MailGun and Gmail.

Sending Your WordPress Emails Using Mailgun

To make it easy, we have created a video tutorial on how to How to fix WordPress not sending email issue that you can watch below.

However if you just want to follow text-instructions, then you can follow our step by step tutorial on how to How to fix WordPress not sending email issue.

Mailgun is a popular email service provider. They allow website owners to send large amounts of emails with high deliverability.

As a dedicated email service provider, they spend a lot of money and time on making sure that your email reaches its destination.

While Mailgun is a paid service, it offers first 10,000 emails for free every month. That’s more than enough for most small websites.

Here is how to setup your WordPress site to use Mailgun for sending emails.

First you need to signup on the Mailgun website. After sigining up, you need to click on “Add your domain” button.

Add your domain to Mailgun

You will now see an add domain page. Here you need to add a subdomain on your WordPress website’s domain name. For example,

You can create a new subdomain on your existing domain name by following the instructions below.

First, you need to visit the cPanel dashboard of your hosting account. Click on subdomains icon under the domains section.

Subdomains icon in cPanel

On the next page, you need to enter your subdomain and then select your root domain from the drop down menu.

Enter your subdomain

After that click on the create button, and you will see a success message that your subdomain has been created.

You can now add this subdomain on Mailgun’s add domain page. After you add the domain, Mailgun will show you a few DNS records.

Mailgun showing DNS records

Switch back to your cPanel dashboard and then click on ‘Advanced DNS Zone Editor’.

Advanced DNS zone editor in cPanel dashboard

You will be asked to select the domain for which you want to change the DNS records. Once you select your root domain name, you will see options to add new DNS records.

The first TXT entry will be your subdomain. Enter the subdomain in the Name field and then TXT as record type. Add 14400 in TTL field and copy the value shown on Mailgun domain verification settings page into TXT Data field.

DNS TXT record

Repeat the process to add the other TXT record.

Once you are done, switch back to the cPanel dashboard and click on the MX Entry icon.

MX Entry menu

You will be asked to select your root domain, then scroll down to the bottom of the page. There you will see the option to add a new MX Entry.

Add MX entry

Enter the priority and destination values and click on create new record button.

You have successfully added your domain to Mailgun. It will need to verify that your domain has proper DNS records. This may take a while because DNS records may take sometime to update.

You can check the status of your domain verification by visiting Domains page in your Mailgun account.

Mailgun will show active status next to your domain name once it can verify the DNS changes you made.

Mailgun active domains

Once your domain is active, you can setup your WordPress site to start using Mailgun for sending emails.

First thing you need to do is install and activate the Mailgun for WordPress plugin. For more details, see our step by step guide on how to install a WordPress plugin.

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

Mailgun for WordPress plugin settings

By default, Mailgun sends emails by using HTTP API. This is the recommended method, but if for some reason it doesn’t work on your website, then you can switch to SMTP.

You will need your MailGun API keys. Simply login to Mailgun dashboard and click on your domain name. Mailgun will show your SMTP credentials as well as API key.

Mailgun API keys

You need to copy and paste those keys into plugin settings and click on the save changes button.

After storing your settings you can click on the test configuration button. Mailgun will test your settings and will show you a success message.

That’s all, you have successfully setup your WordPress site to send emails using Mailgun.

Sending WordPress Emails Using Gmail SMTP Servers

Another alternative is to send your WordPress emails is using Gmail SMTP servers. You can use any regular Gmail account with this method to send out your emails. However, your email deliverability will be much better if you are using Google Apps for Work on that particular domain name. See our guide on how to setup a professional email address with Google Apps and Gmail.

Whether you use paid or free Gmail address, rest of the instructions are the same.

First thing you need to do is install and activate the Gmail SMTP plugin.

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

Gmail SMTP plugin settings

Gmail wants you to create an App and use API keys for using their SMTP servers. Follow the instructions in our detailed step by step guide on how to setup WordPress to use Gmail SMTP servers.

We hope this article helped you fix WordPress not sending email issue. You may also want to check out our list of 14 most common WordPress issues and how to fix them.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Sacha Doucet says:

    The article and video were super helpful! Thank you!!

  2. Amy says:

    Just wanted to say – thank you so much for this article! Has helped me fix my forms :) not sure what the issue was before, if it was the server or what – but the mailgun solution worked perfectly for me.

  3. Akinola King says:

    Thanks for this article.

  4. David says:

    Great article! Thank you for sharing!

    1) Why does the mailgun HTTP API not require a username and password like the SMTP solution does? Is it because mailgun is verifying at the DNS level (with its SPF and domain key records) and with the API — so this setup removed the need for the SMTP credentials?

    2) Am I correct that these sending issues (being rejected by Google or Yahoo’s mail servers) are mostly because people are trying to send email from their WP installations but are using a to send email from a WP install at

    3) Would mailgun allow someone to send email as even though the mail is coming from the WP install at

    Thanks for your help!

  5. Shaun Lawson says:

    Thank you so much for these great instructions.
    Worked for me first time.


  6. Lucas Shepherd says:

    Postman SMTP fixed my wordpress email after trying everything everyone told me to try.

  7. meenakshi says:

    My cpanel is not showing Advanced DNS Zone edittor in Domain section . Wha shoud I do?

  8. Mabel says:

    I need help. I have successfully installed mailgun using your videio How to Fix WordPress Not Sending Email Issue, but my email notifications still do not send. Do I have to enter some code into each email template? I have no idea what I am doing.

  9. bobby says:

    You should really warn people about changing the mx records. It ruined my incoming mail for 5 hours and i had to change them back.

  10. Bobby says:

    I set this all up and never got an activation email from Mailgun. Pretty pathetic that an email smtp service can’t even figure out their own account activation system through….ugh….email.

    I sent a support ticket in. Now, because I changed the settings on my hosting, NONE OF MY EMAIL IS WORKING. I have tried three different emails to activate the account, and none have gotten the activation email.

  11. Luke Cavanagh says:

    SendGrid is the best option now, the free plan covers up to 12,000 emails a month.

  12. Marco Floriano says:

    Amazing video, amazing tutorial. Nice solution. Perfect! Mailgun is amazing, thanks a ton guys!

  13. Ademide says:

    Thank you for tutorials. I couldn’t proceed because I was having the following error “Your account is temporarily disabled. Business Verification Please contact support to resolve”. I have raised two tickets already, it doesn’t seem to be helping. Any idea what I need to do to get this resolved?

    • WPBeginner Support says:

      Mailgun has internal checks in place which may sometimes flag an innocent account as suspicious. You simply need to contact their support, they will ask you a few questions about your email usage and will unlock your account.

  14. Wout says:

    Oh man thank you so much for this! You’re lifesavers! Mails from my wp-site used to end up in Spam, now they reach the inbox with no problems… One thing worth mentioning may be that the domain you set up in Mailgun doesn’t show up in WP mails to users/customers, so you don’t have to use a matching domain for your site. You can setup in Mailgun for your WordPress site and it works.

    • WPBeginner Support says:

      It works, but to ensure maximum delivery in the long run, it is recommended to use the same domain as your website.

    • Wout says:

      Actually I still had some issues after testing, and decided to install sendgrid plugin, and that was easier to setup and works like a charm…

  15. Lavish says:

    My domain name is attached to Google Apps emails, I don’t want to mess up things. Can I instead use .org version of my domain name. I have .org and it is just parked (redirecting to .com) unused.


  16. Luke Cavanagh says:

    Just make it easy and use SendGrid. You just create a general API and then add it into the settings of the SendGrid plugin on the site you need to use it on.

  17. Michael Story says:

    Hi you mention needing the shortcode for later in the video, where do you use the shortcode? Does it replace gravity forms?

  18. Bill Frankell says:

    Oh man, where were you last week with this? I spent four days of vacation working all this out on my own.

    However I do not see my problem listed, which was using Yahoo mail.

    Been a yahoo user since 2000 so hated to give way but finally set up new gmail accounts on all my websites which changed everything. I now have those accounts all forwarding to Yahoo, each with a note in the from address telling me their source.

    There may have been a way to make Yahoo work, but I didn’t find it and finally gave up. This is a better setup because it lets me set up separate mailing lists and work with mail chimp and sumo me. So far in the last week we have collected over a hundred new members on one site, the difference is that now I get to see each one as it comes in, can delete my yahoo notice and still have the record on Gmail archives.

    Having said all this, this page is being bookmarked for future reference. Thanks, it was almost timely.

  19. amit says:

    Sending WordPress Emails Using Gmail SMTP Servers. is it free feature

    • WPBeginner Support says:

      There are both free and paid options. The free option is less reliable than the paid option.

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 comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.