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 Change Sender Name in Outgoing WordPress Email

Do you want to change the default sender name and email address for outgoing WordPress emails? By default, WordPress uses ‘WordPress’ as the sender name for all outgoing WordPress notification emails. In this article, we will show you how to change the default sender name… Read More »

The post How to Change Sender Name in Outgoing WordPress Email appeared first on WPBeginner.

Do you want to change the default sender name and email address for outgoing WordPress emails? By default, WordPress uses ‘WordPress’ as the sender name for all outgoing WordPress notification emails. In this article, we will show you how to change the default sender name and email address in outgoing WordPress email.

Changing default sender name and email address in WordPress outgoing emails

Why You Should Change the Default Sender Information in WordPress?

The default WordPress sender name is ‘WordPress’ which sends emails from a non-existent email address ([email protected]) as the sender email.

Many spam filters block your WordPress emails believing it to be spam. Sometimes it does not even make it to the spam folder.

For more on this topic, take a look at our guide on how to fix WordPress not sending email issue.

The outgoing email notifications are important, and you should use your own brand and email address. This increases the authenticity of your brand and increases name recognition among your users.

Having said that, let’s see how to change the default sender name and email address in outgoing WordPress email notifications.

Method 1: Changing Default Sender Name and Email using a Plugin

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

Upon activation, you will notice a new menu item labeled CB Mail Sender in your WordPress admin bar. Clicking on it will take you to plugin’s settings page.

Mail sender options

You will need to enter the name and email address you want to be used for outgoing WordPress emails.

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

That’s all, all your WordPress notification emails will now show the name and email address you entered in plugin settings.

Bonus tip: You should use a professional email address. See our guide on how to create professional business email address.

Method 2: Manually Change Sender Name and Email Address

This method requires you to paste code into your WordPress files. If you are new to adding code in WordPress, then take a look at our beginners guide on pasting snippets from web into WordPress.

You will need to add the following code in your theme’s functions.php file or a site-specific plugin.

// Function to change email address

function wpb_sender_email( $original_email_address ) {
    return '[email protected]';
}

// Function to change sender name
function wpb_sender_name( $original_email_from ) {
	return 'Tim Smith';
}

// Hooking up our functions to WordPress filters 
add_filter( 'wp_mail_from', 'wpb_sender_email' );
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );

This code simply replaces the default WordPress sender name and email address with your custom sender name and email address.

You can test this by adding a new user, changing password, or any other action that sends WordPress notification email.

We hope this article helped you learn how to change sender name and email address in outgoing WordPress email. You may also want to see our guide on how to send email to all registered users in 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 Change Sender Name in Outgoing WordPress Email 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 Mailgun. 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 Mailgun. 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.

Using SMTP Server to Send WordPress Emails

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, this causes your WordPress emails to not be delivered.

The alternative solution is to use a third party email service to send out your emails. You can use services like Mailgun, 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 are already paying for it?

Using Email Accounts by Your Host

Most WordPress hosting providers offer email services for each domain you host with them. This means you can create email accounts with your own domain name like [email protected].

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 [email protected]. Make sure to 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. For more details, see our step by step guide on how to install a WordPress 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. If you haven’t done this before, then please see our guide on how to edit wp-config.php file in WordPress.

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.

define( 'WPMS_ON', true );
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.

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.

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, Mailgun, 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 list of the must have WordPress plugins for businesses.

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.