Or copy link
Copy link
WordPress can send basic emails like registration and password reset messages. However, many web hosting providers do not support this feature or don’t offer email services at all. In that case, you can use a service like SendGrid, which handles emails for some of the world’s biggest companies. SendGrid can send both marketing emails and important one-time emails like password resets or order confirmations. It makes sure your site’s emails get delivered properly.
In this write-up, we’ll show you how to set up SendGrid with your WordPress site in a few simple steps.
WordPress, by default, uses the PHP mail() function to send emails. The mail() method lacks authentication and often causes emails to land in the spam folder or not be delivered at all. That’s why many users never receive important notifications like password resets, contact form messages, or order confirmations.
Configure SendGrid With Our WordPress Hosting
Experience Ultahost’s fast, user-friendly, and secure WordPress hosting to improve the security of your website while integrating third-party services like SendGrid.
To fix this issue, you can integrate a reliable email delivery service like SendGrid using SMTP server or its API. SendGrid authenticates your emails and makes them appear trustworthy to mail providers like Gmail, Outlook, and Yahoo. This way, SendGrid significantly improves the chances of your emails reaching the inbox.
For example, imagine you run an online store with WooCommerce. A customer places an order, but they never receive the confirmation email because your server sent it using the default mail() method, and it was flagged as spam.
Now, let’s say you’ve configured the SendGrid WordPress plugin on your site. The next time a customer places an order, the confirmation email goes out through SendGrid’s trusted servers. If it passes all necessary authentication checks, the email lands safely in their inbox.
Before we get started, make sure you have a SendGrid account. If not, go to their website and sign up for a free account.
Visit the official SendGrid website and click on the Start for free button to create your SendGrid account:
Provide the required details and click on the Continue button to create your account:
Verify your email by specifying the appropriate code:
Once your account is ready, you need to create your sender identity. You have two options:
Although setting up a single sender works, the recommended method is domain authentication for better email delivery. Let’s go through both options one by one:
Option 1: Add a Single Sender
Sign in to SendGrid and click the “Create Identity” button:
Provide the necessary details and then click on the Create button:
After this, you will be navigated to the following window:
Check your inbox for a confirmation email and click the link to verify:
Option 2: Authenticate Your Domain (Recommended)
Domain authentication proves that emails are coming from a domain you own. This builds your domain’s reputation and prevents your emails from being marked as spam.
From your SendGrid dashboard, scroll down and click Authenticate Domain. You can do this by going to Settings > Sender Authentication:
After this, you’ll be prompted with two questions to authenticate your domain. First, select your DNS provider (such as ultahost) from the dropdown list:
If your DNS provider is not available in the list, you can “choose Other Host (Not Listed)”. Next, select Yes to use your domain for email links instead of SendGrid’s:
Now you need to specify the domain name and uncheck the box for “use automated security” setting:
After that, tick the box labeled “Use Custom Return Path” and enter a subdomain in the Return Path field. A typical website address looks like www.example.com, but a subdomain replaces the www with something else. For example, blog.example.com is often used for a blog section. Subdomains like this help create separate parts of a website:
If you’re not sure what to use, we suggest typing SG as the subdomain. After entering it, click Next. The next page will show you the DNS records:
Open a new tab and log in to your domain provider (usually your hosting company). Navigate to your domain’s DNS Settings and click on the “Add New Record” button to add a new DNS record:
Select the Type from the list, copy the Host value from SendGrid, and paste it into the Name/Host field. Then, copy the Value and paste it into the Value field. Set the TTL to 1 day or 86400 seconds, if it’s editable:
Repeat this for all the required records. After adding all DNS records, return to SendGrid and check the box “I have added these records”, then click Verify:
It can take up to 48 hours for SendGrid to verify the records.
Read also How to Install Cloudflare on your WordPress Site
The next step is to create an API key. In your SendGrid dashboard, click on Email API from the left menu, Integration Guide, and select SMTP Relay.
After that, click the Create Key button to generate your API key:
Copy the API key and keep this tab open.
Log in to your WordPress site and go to WP Mail SMTP > Settings. After this, enter an email address in the From Email field that matches your verified domain. Check the box Force From Email. In the From Name field, enter a name you want to appear on outgoing emails. You can also check Force From Name:
Scroll down to the Mailer section and select SendGrid:
Once you select the SendGrid option, two new fields will appear:
Now, go back to your SendGrid account and copy the API Key:
Paste the key you copied from your SendGrid account to the API key field. The Sending Domain is Optional. You can enter the subdomain you created in the Sending Domain Field:
Finally, click the Save button to apply the Settings.
After configuring SendGrid, go to WP Mail SMTP > Tools > Email Test. Enter your email address in the Send To field and click Send Email:
That’s it! You’ve now successfully configured WordPress SendGrid plugin to send emails:
Finally, you can check your inbox to verify that you have received the test email.
You can use SendGrid in WordPress to send important emails like user registration, password resets, or order confirmations. This setup helps you avoid common email delivery problems that often happen when your web host doesn’t support built-in email services. Instead of relying on the default PHP mail() function, which can cause emails to land in the spam folder or not be delivered at all, SendGrid ensures that your emails are sent through a trusted and authenticated platform.
To get started, first create a SendGrid account, then set up your sender identity by either adding a single sender or authenticating your domain. After that, update your DNS records as provided by SendGrid and generate an API key. Finally, install and configure the WP Mail SMTP plugin in your WordPress dashboard using the API key.
Once you’ve completed these steps, send a test email to make sure everything is working correctly.
We hope this article has helped you configure SendGrid in WordPress to send emails. Experience Ultahost’s Email Hosting to host your business email on a secure, privacy-guaranteed platform. Promote your site with every message you send with an email address that matches your website. Check out our plans!
Most WordPress installations rely on the default PHP mail() function, which lacks proper authentication. This often causes emails to be flagged as spam or never delivered at all. On the other hand, SendGrid ensures reliable delivery with proper authentication.
Yes, SendGrid offers a free tier that allows you to send up to 100 emails per day, which is enough for many small to medium websites.
A Single Sender is quicker to set up but less reliable. Domain Authentication improves deliverability by verifying that the email is truly from your domain, which builds trust with email providers.
Yes. SendGrid works seamlessly with WooCommerce and ensures that your order confirmation and transactional emails reach the customer’s inbox.
DNS record updates can take up to 48 hours to propagate and be verified by SendGrid, although it often happens much sooner.
There are several plugins and custom methods available for this purpose, however, WP Mail SMTP is the most user-friendly and recommended way to connect SendGrid to WordPress.
Go to WP Mail SMTP > Tools > Email Test, enter your email address, and click “Send Email”. After this, open your email and check your inbox to confirm delivery.
Docker Compose is a powerful tool designed to simplify ...
WordPress Multisite is a powerful feature that allows y...
WordPress is a popular platform that allows users to cr...
RSS feeds continue to be a stable presence in the const...
Greylisting is a technique used by mail servers to bloc...
Typography plays an important role in the visual appeal...
Save my name, email, and website in this browser for the next time I comment.
Δ