WooCommerce not sending emails every time? Here’s how to fix it

When using WooCommerce, it’s possible for email deliverability to take a hit if your web host is not optimized for email sending. The last thing you want after a positive customer interaction is for the follow-up email to fail. WooCommerce not sending emails is preventable! Here’s how to fix it.

How emails are sent in WooCommerce

For starters, let’s address one important thing: WooCommerce and WordPress don’t actually send emails. “Wait! How is this possible?” you ask. “I can configure email settings inside WooCommerce.” Yes, that’s right but WooCommerce is an e-commerce plugin and WordPress is a content management system. Both of them are not email servers.

WooCommerce email flow

Here’s what actually happens before an email is sent:

  1. WooCommerce will call the wp_mail() function in WordPress.

  2. The WordPress mailfunction then passes the email to PHP, the scripting language behind WordPress.

  3. The PHP mail function finally instructs the mail server at the hosting provider to send the email.

How to fix WooCommerce not sending emails

There are a few reasons why your Woocommerce store emails are not being delivered. Here are the 4 most common issues.

1. Check the status of orders

Sometimes the email is not sent because the transaction has not been completed. WooCommerce lists all your current orders at the Orders page. Orders with a Pending payment status means the customer either abandoned the payment page, had their credit card declined, or will pay manually through a bank transfer. 

Orders page
Sometimes orders are paid through payment gateways like PayPal yet they are still showing as pending payment. This could be a reason for WooCommerce emails not working. Visit the PayPal troubleshooting page for more steps.

2. Verify your WooCommerce email settings

If your order has a Processing status and no emails have been sent yet, check if you accidentally disabled email sending in WooCommerce. It’s easy to do this.

Go to Settings under the WooCommerce menu, click on the Emails tab, and then select the Processing order template. Check that Enable this email notification is ticked. You can also set the Email type to plain text to test if HTML emails are being blocked.

Emails tab

3. Avoid email spam filters

Spam filters may be blocking your recipients from receiving emails. To check this, you can log all outgoing emails from WooCommerce by installing the WP Mail Logging plugin. Create a test order and go to WP Mail Log under the Tools menu. An email that is successfully sent will look like this (in screenshot below) without any errors.

WP Mail Logging log

If the log shows the email as being successfully sent but the recipient has not received it, check that you’re sending from your own domain. Go to the WooCommerce Settings page, click on the Emails tab, and scroll down to Email sender options

Email sender options

The “From” address should be sent from your domain. For example, in the image above, the domain is lovelyscentedcandles.com. Using a Gmail or Yahoo email, like ovidia_candles@gmail.com, will go to the spam folder because the “From” email address is not matching your sending domain.

SMTP error

If you see an exclamation mark in the Error column like the screenshot above, it indicates an SMTP error returned by the receiving mail server. Click the View button and then click Raw to reveal the error message. Unfortunately, SMTP errors can be cryptic as they are handled differently between mail server configurations.

Raw message

4. Resolve conflicts between plugins

If the first 3 troubleshooting options don’t fix the problem, it might be a plugin issue. WordPress plugins can sometimes return errors before status changes happen. WooCommerce itself is a plugin for WordPress sites that can conflict with other plugins in your configuration.

To verify this, you will need to deactivate all of your plugins except for WooCommerce. Then reactivate them one by one to see if status changes are reflected in the Orders page. To assist you, install a plugin like WP debug log to identify “fatal errors” in the log.

Why an email service provider is the best path forward

Troubleshooting WooCommerce to improve deliverability will help, but it is not the best approach for a long-term fix. Ensure transactional emails reach your customers by incorporating an email service provider like MailerSend. You have two options of sending emails from WooCommerce with MailerSend: send quickly with an SMTP server or integrate an advanced email API with an official plugin.

Send WooCommerce emails using SMTP

SMTP (Simple Mail Transfer Protocol) is the fastest and easiest way to send emails from WooCommerce. A WordPress plugin directs the WordPress mail function to tell PHP to send email using an external SMTP server, so the email delivery is handled by an SMTP provider instead of your web host.

First, sign up with MailerSend if you don’t have an account yet. Add a sending domain and then retrieve your SMTP login details at the domain’s page. For optimal email deliverability and security, best practices are implemented such as using port 587 and TLS for the connection. Click on each field to copy it.

SMTP settings
Note: An official MailerSend SMTP plugin for WooCommerce is coming soon. Once released, you will be able to use MailerSend’s SMTP service without the need for a third-party SMTP plugin. Automatically sign in and get authenticated with fewer clicks!

Next, install an SMTP plugin of your choice from the WordPress dashboard. Let’s use Easy WP SMTP as an example here. Once installed, go to Easy WP SMTP under Settings. At the SMTP Settings tab, paste your SMTP settings from MailerSend.

Easy WP SMTP
Depending on your SMTP plugin, choose STARTTLS if you see the option because it will automatically upgrade a plain text connection to an encrypted connection. Otherwise, choose SSL/TLS.

Remember to test your SMTP settings by going to the Test Email tab. Enter an address field and then click Send Test Email to check that email is being sent using MailerSend’s SMTP server.

Test email tab

Congratulations! You just added SMTP sending to WooCommerce! 🎉 For more information about how to enable SMTP in MailerSend, visit the How to send emails via SMTP with MailerSend article.

Send emails with a dedicated WooCommerce plugin

Another way of sending emails from WooCommerce is to use MailerSend’s email API. An official plugin integrates MailerSend into WooCommerce and adds the ability to replace the standard templates with your own design as well as track email activity!

Get started by generating a new API token for your sending domain in MailerSend. Give it a name along with any custom access permissions. Remember to copy or download the API token that you created for the next step!

Create new API token

Next, download the official MailerSend plugin for WooCommerce. Once installed, you will see a new MailerSend menu item under WooCommerce. Copy the API token that you generated earlier, paste it in the API Token field, and click Validate token.

API token field

On the same page, scroll down to Email sending options and enter your sender name and sender address. The name and address entered here will be the default used for all of your emails in WooCommerce.

Email sending options

For best deliverability results, the sender address must match the domain that the API token belongs to. Using a different address will raise authentication issues with email providers and they are likely to filter your emails to spam.

Tempate gallery

Jumping to MailerSend, click on Templates and pick the email template that you wish to send when customers place a new order. When creating a template, you can either start from scratch or select a pre-designed template in the WooCommerce category where you’ll find all native WooCommerce email notifications.

These WooCommerce templates have been designed to include all built-in variables like {{order.odernumber}} or {{customer.firstname}}. Let’s pick the pre-designed Order processing template, for example, which we’ll customize to our store’s graphic identity. If you have a designer, you can design a custom template to match your brand!

Order confirmation template

The subject lines for all email templates will default to the following standard format:

[WordPress] (notification name) {{order.order_number}}

To customize them, go to the individual email template in MailerSend and enable Default settings. Then enter an example like this to match the subject line with your brand:

Your LovelyScentedCandles order #{{order.order_number}} is confirmed!

Order processing email template

Going back to your WooCommerce admin page, go to the MailerSend tab and paste the template ID for Processing order. You can find it on the email template page in MailerSend where you entered a custom subject line. 

Email notifications

To test sending an order email, click on the Save button to save changes and create a test order at the Order page. Return back to the MailerSend tab and click on the Test button next to the template. An email confirming receipt of the order should be sent! 🎉

From now on, your MailerSend templates will be triggered instead of the default WooCommerce templates. As a bonus, you can also track all email activity on the Activity page in your MailerSend account, a feature that is not possible using SMTP.

Activity page
For more information, including all the WooCommerce notifications and variables supported by the plugin, check out the detailed help article: How to integrate MailerSend with WooCommerce.

Take control of your e-commerce emails

WooCommerce is an incredible platform that powers millions of e-commerce stores, but it's not immune to email deliverability hiccups. You can ensure your online store delivers an amazing customer experience every time by using an email service provider like MailerSend. WooCommerce coupled with a proven email sending infrastructure is your best bet for happy customers!

How are you currently sending emails from WooCommerce? Share in the comments below.

Agathe
I'm Agathe, Project Manager at MailerSend. When I'm not busy rolling out new product features, I'm planning my future mud-brick farmhouse complete with farm animals and a vineyard!