How to Improve WordPress Email Deliverability with SendGrid

Do you want to improve email deliverability from your WordPress site? Often web hosting providers don’t have properly configured mail settings, which blocks WordPress from sending emails. In this article, we will show you how to improve WordPress email deliverability with SendGrid. The Problem with… Read More »

The post How to Improve WordPress Email Deliverability with SendGrid appeared first on WPBeginner.

Do you want to improve email deliverability from your WordPress site? Often web hosting providers don’t have properly configured mail settings, which blocks WordPress from sending emails. In this article, we will show you how to improve WordPress email deliverability with SendGrid.

Improve WordPress Email Deliverability with SendGrid

The Problem with Emails in WordPress

By default, WordPress uses the PHP mail function to send out emails. Many WordPress hosting providers do not have this function configured properly. Some even block it to make sure that their servers aren’t used to send spam.

This becomes problematic for site owners because their WordPress site fails to send some or all emails.

WordPress emails are crucial for resetting passwords, sending notification emails, running an online store, getting contact form notifications, and more. If WordPress can’t send emails, you could get locked out of your site or lose customers by missing out on important notifications.

Having said that, let’s take a look at how to improve WordPress email deliverability with SendGrid (for free).

What is SendGrid?

SendGrid is an email service provider. They offer highly optimized email servers that you can use to send out your emails.

They offer both transactional email service (one-to-one emails like WordPress notices, order receipts, password resets, etc.) and email marketing services.

Like all good email service providers, SendGrid spends significant resources to improve deliverability. This ensures that your WordPress emails land in your users’ inboxes, instead of being marked as spam. This is why companies like Uber, Spotify, Airbnb, Yelp, and thousands of others use SendGrid.

Sending WordPress Emails Using SendGrid

To set up SendGrid to work with your WordPress site, first you’ll need to visit the SendGrid website and sign up for an account.

SendGrid is a paid service, but they also offer a free plan which allows you to send up to 12,000 emails each month. That’s plenty for most small to medium-sized websites.

As your site grows, you can upgrade to their paid plan. It starts at $9.90 per month for up to 40,000 emails. You can scale your pricing based on how many emails you need to send every month, but in our experience the free plan is sufficient for most folks.

Next, you need to install and activate the SendGrid WordPress plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, visit Settings » SendGrid to configure the plugin.

sendgrid-plugin

The plugin allows you to connect your WordPress site to SendGrid. You can do that by adding an API key or by using your SendGrid username or password.

We recommend using the API key method because it’s more secure. We will only cover the API method in this tutorial.

Start by visiting your SendGrid account dashboard and then click on Settings » API Keys.

Get API Key for SendGrid

Next, you need to choose how to send mail. You can send it using the SendGrid API, or with SMTP.

The SMTP method requires Swift Mailer support. You can add it by installing and activating the Swift Mailer plugin on your WordPress site.

But you don’t need that. We recommend using the API method, since it’s easier to set up and more secure.

Go back to the Settings » SendGrid page in your WordPress dashboard. Under the Mail Settings heading, you’ll need to provide the sender name, email address, and reply-to address.

Edit mail settings in the SendGrid plugin settings in WordPress

The name can be your website name, and the sending address can be your professional email address.

In other optional settings, you can choose to use email templates from SendGrid website and add their template ID in plugin settings. You can also create and use categories for emails you send through WordPress.

Don’t forget to click on the Save Changes button to store your settings.

That’s all! SendGrid will now replace the default WordPress mail function with SendGrid API, providing more reliable email service.

You can test it by performing any action that generates an email notification from WordPress. For example, you could reset your password, add a new user, or fill out your contact form.

We hope this article helped you improve your WordPress email deliverability with SendGrid. You may also want to see our article on customizing email notifications from WordPress.

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.

The post How to Improve WordPress Email Deliverability with SendGrid appeared first on WPBeginner.

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.… Read More »

The post How to Fix WordPress Not Sending Email Issue appeared first on WPBeginner.

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

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, mail1.yourdomain.com.

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.

The post How to Fix WordPress Not Sending Email Issue appeared first on WPBeginner.

How to Use SMTP Server to Send WordPress Emails

Are you having trouble receiving or sending emails from your WordPress site? One solution for that is to use third party email services such as Mandrill. However, these services will cost you extra money. In this article, we will show you how to use a… Read More »

The post How to Use SMTP Server to Send WordPress Emails appeared first on WPBeginner.

Are you having trouble receiving or sending emails from your WordPress site? One solution for that is to use third party email services such as Mandrill. However, these services will cost you extra money. In this article, we will show you how to use a SMTP server to send WordPress emails.

Sending WordPress emails using SMTP server

The Problem with WordPress Emails

WordPress uses mail function in PHP to send emails. Many shared hosting providers do not have this function configured properly, or they have disabled it entirely to avoid abuse. In either case, your WordPress emails will not be delivered.

The alternate solution is to use a third party email service to send out your emails. You can use services like Mandrill, Google Apps for work, or Sendgrid.

You will have to pay for your account, and the cost will vary depending on how many users/accounts you add or the number of emails you send. See our tutorial on how to fix WordPress not sending email issue.

What if we told you that there is another option, and most likely you have already paid for it?

Using Email Accounts by Your Host

Most WordPress hosting providers offer email service for each domain you host with them. This means you can create email accounts with your own domain name like yourname@yoursite.com.

First you will need to create an email account. For the sake of this example, we will show you how to create an email account in cPanel. Your hosting service provider may use some other account management system, but the basic process is the same on most hosting services.

Log into your hosting account, and click on email accounts under the mail section.

Email accounts

This will show you a simple form where you need to fill out information required to create your email account.

Since we will be using this account to send WordPress emails. We recommend that you create an email account like wordpress@example.com. Replace example.com with your own domain name.

Creating email account in cPanel

After creating your email account, you are now ready to use it in WordPress. But before you do that, you will need the following information from your hosting service provider.

1. SMTP Host for your email address.
2. SMTP Port for secure login

You can check the support section on your host’s website for this information. Most likely there will be an article providing this information. If you don’t find it, then you should contact the hosting support to request this information.

Using Your Branded Email Address in 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.

Setting up WordPress to use your SMTP server

First you need to enter the email address you just created. After that you can add a from name.

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

Make sure that the ‘Send all WordPress emails via SMTP’ option is checked.

Under the SMTP options section, fill out your SMTP host and port information you obtained from your hosting provider. For encryption method, you need to select SSL for encryption.

Since we are using an SMTP server, the plugin will need your login credentials to send out emails. Under the authentication section, check ‘Yes: Use SMTP authentication.’ option and provide your SMTP login details.

Next, click on the save changes button to store your settings. The settings page will now reload, and you will see the ‘Settings saved’ message.

Testing Your SMTP Settings

WP Mail SMTP comes with an email testing tool. After saving your settings, scroll down to the bottom of the page and enter your email address.

Sending test email

WP Mail SMTP will send a test message to the email address you provided. If you do not receive the test message, then this means that WP Mail SMTP is not configured properly.

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.

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

Pros and Cons of Using Your Web Host’s Mail Servers for WordPress Emails

First and the most obvious advantage is that you can use your own branded email address for outgoing emails in WordPress.

Another advantage is that you have already paid for this service when signing up for your hosting account. You will not need to pay any extra money for sending and recieving emails.

However, some WordPress hosting providers enforce limitations on outgoing emails. This is why we don’t recommend using WordPress to send newsletter emails.

Another common problem with shared hosting providers is that their mail servers can be quite unreliable at times. If you notice delays in email delivery, then you should consider using third party email services like Google Apps for Work, Mandrill, or SendGrid.

We hope this article helped you learn how to use SMTP server to send WordPress emails. You may also want to see our case study on how we increased our email subscribers by 600% with OptinMonster.

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.

The post How to Use SMTP Server to Send WordPress Emails appeared first on WPBeginner.