Education logo

Sending Emails in WooCommerce

In 2022, WooCommerce had a market share of 36.68%, making it the leading e-commerce platform worldwide. Online stores use transactional emails to send notifications to their customers, such as receipts or order confirmations. So, WooCommerce also needs a working email-sending functionality.

By Mary HlmlnPublished about a year ago 5 min read
Like

Transactional emails in WooCommerce: definition, importance, examples

Transactional emails are emails that are triggered when a user takes a specific action.

For example, when you forget your super difficult password (mydogmax111) for the 100th time and request a reset, you’ll receive an email with a password reset link. That would be a transactional email.

Such emails are important as they provide users with necessary information about further steps, confirm their action, or let them know if something was unsuccessful. Refer to this article to learn more about WordPress transactional emails.

By default, WooCommerce includes certain types of transactional emails that can be modified to match your needs. These are usually WooCommerce order emails:

  • New order – sent to site administrators
  • Canceled order – sent to site administrators
  • Failed order – sent to site administrators
  • Order on hold – sent to customers
  • Processing order – sent to customers
  • Completed order – sent to customers
  • Refunded order – sent to customers
  • Customer invoice / Order details – sent to customers
  • Customer note – sent to customers
  • Reset password – sent to customers
  • New account – sent to customers

These templates are available in plain text, HTML, or multipart formats. You can use them as they are or change their color or banner image. For that, you’d need to access WooCommerce email settings and scroll down to the ‘Email template’ section.

It’s also possible to change a particular template, for example, processing order. Simply press the ‘Manage’ button across the template. Fill in the empty fields, such as email subject, heading, additional content, and choose the email type (text, HTML, or multipart). Finally, hit ‘Save changes’.

If that’s not enough and you need more tweaks, just copy the template file below those fields by pressing ‘Copy file to theme’.

Navigate to the ‘Appearance’ tab in the WordPress dashboard and choose ‘Theme file editor’. You’ll see the ‘Theme files’ tab on the right portion of the screen. Scroll down to find ‘WooCommerce’. Expand it and press ‘emails’ which will open the menu with the list of templates you copied.

Note: it’s recommended to create a child theme and make changes there to avoid losing all the customizations in the parent theme.

WooCommerce’s default customization options are limited, but there are multiple plugins that can help with that (more on that below).

Though plugins enable you to customize the design, you still have to come up with the content yourself or use templates. Here’s an order confirmation template from Mailtrap:

Subject: Your [SERVICE] order confirmation

Your order is confirmed!

[NAME], thanks for shopping with us. Here are your order details:

[orderID]

[product + picture]

[quantity/other customizations]

[price_paid + payment method] // if payment by card, the last four digits should be used

[shipping + billing address]

We estimate that your order will arrive in 2-3 business days. Click the button below to track it.

TRACK YOUR ORDER

Forgot to add something? Here are the items our clients frequently buy together with [PRODUCT]. Get them within the next 24 hours, and we’ll ship everything together.

[FAQs]

Need any support? Send a reply to this message or contact us right away [link].

Thanks for your order and we hope you enjoy!

How to send emails in WooCommerce with the WP Mail SMTP plugin

As mentioned above, it’s possible to send emails programmatically from WooCommerce with the WordPress wp_mail() function. It calls PHP’s mail()function, which in turn connects with the local host to send emails. Check out this blog post to find more information about sending emails in WordPress.

Without header authentication, PHP’s mail() function is often blocked by WordPress hosting providers. Email servers don’t tolerate this function either, putting incoming emails in the spam folder.

But that’s not the only issue. WooCommerce emails might not be sent or delivered for other reasons as well (refer to the troubleshooting section below for more details).

WP Mail SMTP plugin (or any other SMTP plugin, for that matter) solves those problems by overriding the mail() function and allowing users to configure WordPress SMTP settings.

This plugin connects Gmail SMTP or third-party SMTP service. By doing so, it enables you to send multiple emails from your WooCommerce store regardless of your web host.

What other plugins can you use to customize and send emails in WooCommerce?

Post SMTP can be used as an alternative to WP Mail SMTP, while YayMail Email Customizer is one of the many plugins that can help with email customization.

Post SMTP Mailer/Email Log

Post SMTP is a WordPress plugin that has the same concept as WP Mail SMTP: it overrides the PHP mail function and sends emails with an SMTP server.

This email plugin includes various features, including support for multiple SMTP servers, email logging and debugging, and the ability to customize the From address and subject line of outgoing emails. It also comes with a built-in SMTP test tool to help you troubleshoot any issues you may encounter.

YayMail – WooCommerce Email Customizer

YayMail WooCommerce Email Customizer is a WordPress plugin that allows you to customize email content and design.

With this plugin, you can easily edit the layout of default WooCommerce templates by customizing the colors, fonts, and images, and adding custom fields. These could be the customer’s first name or the order total. The plugin comes with shortcodes that can be used to create dynamic content such as customers’ order history, a list of related products, or coupon codes.

YayMail has a drag-and-drop menu for easy editing.

WooCommerce not sending emails: troubleshooting the most common issues

Even though the WP Mail SMTP plugin solves most of the sending problems, it’s not almighty. WooCommerce might still not send emails because of its quirks. Below we’ll list down common ways to fix WooCommerce sending issues.

Checking the order status

Pending orders are a common cause of not receiving emails. These are abandoned cart orders, i.e. users didn’t proceed with payment and left the checkout page. Pending orders are considered to be incomplete orders, which is why they don’t trigger emails.

If you receive payment via Paypal and the status of the payment is ‘Pending Payment’, it could indicate a problem with your payment gateway. In that case, you should contact WooCommerce support.

If you don’t have pending orders and all the order statuses are in check, you might be facing plugin incompatibility. The solution is to disable all the plugins except for WooCommerce and see if the issue gets resolved.

Checking the email notification settings

Normally, when orders update from pending to processing, you should receive an email along with your customers. If you’re not receiving emails, it could be because the ‘Enable this email notification’ is toggled off.

Go to the ‘Emails’ tab in your WooCommerce settings and make sure this checkbox is marked for every template.

Checking whether the emails were sent and not received

If all the above steps check out but the emails are still not getting sent, the issue might be with From address and name. If you’re not using an SMTP plugin, go to the email settings of your WooCommerce store, scroll down to the ‘Email Sender options’ tab, and make sure you’re using an email address with your domain in it ([email protected]).

Thanks for reading the Mailtrap guide about emails in WooCommerce.

product reviewhow to
Like

About the Creator

Mary Hlmln

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.