I am getting orders, but no emails are sending! ↑ Back to Top
There are multiple factors that can be the cause. Before explaining the actual mail side of the issue, please ensure that it’s not one described below.
Check for Pending Orders
- Your orders are pending. Pending orders are orders where the customer clicked “Place Order” but abandoned the payment page (depending on the payment gateway, i.e., PayPal) or had their credit card transaction declined. If you have pending orders, these orders will not generate emails.
- You have pending orders but receive payment for them via a payment gateway such as PayPal, which requires a notice to update order status on your site. In this case, you are not looking at a email issue; you are looking at an issue with your payment gateway and may need to submit a support ticket.
Check your Email Settings
Orders that are properly updating to Processing should generate an email. Another possible issue is having mistakenly disabled emails from sending. Double-check that “Enable this email notification” is ticked for order notifications. An additional test should be setting the Email Type to Multipart.
Your emails are broken
If emails are enabled and orders are updating to Processing, then there is most likely an issue in the email delivery to a recipient. This could be a spam blocker that classified your emails are spam and stopped them. The best way to resolve this is to sign up for an account with a dedicated SMTP provider, and an average site can usually stay within free usage accounts that are available.
How does email work? ↑ Back to Top
Comparing a path an email takes to reach its destination vs. driving a car on a road trip, emails do not travel directly from point A to point B. The final destination is more like point W, and the email is bouncing from one server to another at the speed of light while being filtered at each step. Google has put together this representation of the path an email follows. This story is specific to Gmail and delivering to a mobile device but helps explain how email works.
How does email work with WordPress? ↑ Back to Top
WooCommerce, and most plugins sending email, send mail by using the wp_mail() function that is a core function of WordPress.
Does that mean WordPress sends my email? Is WooCommerce sending the email?
Neither are sending the email. What happens is WooCommerce calls the wp_mail() function, which then requests WordPress to send the email. Because WordPress is not an email server, it typically asks PHP to send the email for it. PHP then checks for a local email server within the web server and tells that email server to send the email. Your email passes three steps before reaching your web server.
If email is passed to my web server to be sent, how does a dedicated SMTP provider fit in?
By using a plugin the SMTP provider has available or the Postman SMTP plugin, the wp_mail() function reroutes the email from PHP to your SMTP provider. From there, the SMTP provider receives the request and adds your email to a queue to be sent.
What is a dedicated SMTP provider? Is that like my Gmail account? ↑ Back to Top
A dedicated SMTP provider is like a web host in the sense that you have an account and use their servers. The difference is instead of hosting websites, you use their servers to send emails. Gmail is an email provider where you send and receive emails; a dedicated SMTP provider is similar to having half of Gmail, where you only send emails and not receive them.
So can I use Gmail as my SMTP provider?
Yes, but it is not ideal. Gmail will disable your account if you send emails to more than 500 unique recipients in an 24-hour period. This includes emails you send yourself and all emails your website is sending. Your account would be disabled for a day before you can use it again.
Suggested Dedicated SMTP Providers ↑ Back to Top
There are three providers who have a free account available and will work for most websites. All three have their own plugin on WordPress.org and can be installed from your WordPress dashboard, and have support available to help you get started.
- SendGrid (Plugin) – You can get a free account to send up to 40,000 emails per month if you host with Rackspace. Otherwise, the free account is limited to 200 emails/day (~6000/month)
- Mailgun (Plugin) – Owned by Rackspace, free account limits to 200 emails/day (~6000/month)
- Mandrill (Plugin) – From MailChimp, it costs $9.95/month for up to 50,000 emails/month
Why did you leave out Amazon SES?
Amazon Simple Email Service works well, but tends to fail if you send HTML emails. It has historically caused issues for WooCommerce users, so it is not recommended. You can use it if you set all your emails sent in Plain Text instead of HTML.
If emails are being blocked by spam filters, why is it not in my spam folder? ↑ Back to Top
The spam filter is the last and final spam filter your email is filtered through, at which point it is going to spam based on your email client settings or how you mark other emails as spam. If your emails are denied by another spam filter before that, it simply is not delivered.
My contact form emails work, so why do WooCommerce emails get blocked? ↑ Back to Top
Without deep investigation into server logs and tracking exact email paths, this is not a simple question to answer. The short version is there is a lot more to spam filters than scanning for Nigerian Princes and typical spam. Spam filters check the IP address of origin, the sending user and domain, the amount of email that IP/sender has sent, how many times emails from that sender have been marked as spam, and the wording of emails. The most common factor is where the email originates, which brings your overall score with spam filters down low enough that even minor differences in wording and formatting of WooCommerce emails may be flagged as spam and not sent.
Can I send purchased downloadable files as attachments in the Order Completed and Invoice emails? ↑ Back to Top
Yes! Add this snippet to the end of your theme’s
Can I adjust my “New Order” emails to show my customer’s name and email address instead of my own?
Yes! Add this snippet to the end of your theme’s
Resources ↑ Back to Top
Here are some resources that can help you send emails reliably.
Using the Mandrill API, it sends outgoing emails from WordPress with or without attachments. Emails are tracked and tagged for stats in the Mandrill Dashboard, and it can be used with MailChimp.
SenderScore by ReturnPath
Check and monitor the reputation of your websites IP address for sending emails, if you have your own dedicated server for sending emails. You can also use this for shared and virtual hosting environments, but it is better to get a dedicated SMTP provider instead because those environments are not recommended for sending emails.