I am getting orders but no emails are sending! ↑ Back to Top
There are multiple factors that can come into play here. Before explaining the actual mail side of the issue please make sure you are not running into one of the issues below.
Check for Pending Orders
- Your orders are pending. Pending orders are orders where the customer clicked “Place Order” but depending on the payment gateway they could have abandoned the pay page (ie. PayPal), or if you have a credit card gateway the transaction could have been declined. If you have pending orders, these orders will not generate any emails.
- You have pending orders but did receive payment for those orders via a payment gateway such as PayPal which requires a notice to update the order status on your site. In this case you are no longer 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
If you are getting orders that are properly updating to the processing status this is when emails should start sending. The next issue you may have is simply having mistakenly disabled the emails from sending all together. You should double check the emails that are not sending have the “Enable this email notification” checked.
So your emails are really broken
When your emails are enabled and orders are updating to the processing status this means that there is most likely an issue somewhere in the process of the email being delivered to the recipient. Typically this is a spam blocker decided that your emails are spam and stopping them from being delivered. The best way to resolve this is to sign up for an account with a dedicated SMTP provider (an average site can typically stay within the free usage accounts that are available).
How does email work? ↑ Back to Top
If you were to compare the path an email takes to reach its destination to driving a car on a road trip then emails do not travel from point A directly 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 being filtered at each step along the way. Google has put together this representative of what the path is like for an email. This story is mostly specific to Gmail and delivering to a mobile device but helps explain quite a bit about how email works.
How does email work with WordPress? ↑ Back to Top
WooCommerce (and and just about any other plugin sending email) will send mail by using the wp_mail() function which is a core function of WordPress.
Does that mean WordPress sends my email? Is WooCommerce sending the email?
Neither are sending the email. What is actually happening is WooCommerce calls the wp_mail() function which asks WordPress to send the email. Since WordPress is not an email server it will typically ask PHP to send the email for it. PHP then will check for a local email server within the web server and ask that email server to actually send the email. So before your email even leaves your web server it has gone through three hands.
If the email is passed off to my web server to send the email, how does a dedicated SMTP provider fit in?
By using either a plugin the SMTP provider has available or by using the WP Mail SMTP plugin the wp_mail() function will actually reroute the email from being passed to PHP to passing the email to your SMTP provider. From there that SMTP provider receives the request and adds your email to a queue to be sent off.
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 utilize their servers to send emails. Gmail is an email provider where you send and receive emails, a dedicated SMTP provider is like having half of Gmail. You can only send emails, you cannot receive emails.
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 is including all emails you send yourself on top of all the emails your website is sending. Your account would be disabled for about a day before you can use it again – this includes sending emails yourself as well.
Suggested Dedicated SMTP Providers ↑ Back to Top
There are three really great providers who all have a free account available that will work for most websites. All three have their own plugin available on WordPress.org and can be installed right from your WordPress dashboard and have support available to help you get started.
- SendGrid (Plugin) – You can get a free account for sending up to 40,000 emails per month if you host with Rackspace, otherwise their free account is limited to 200 emails/day (~6000/month)
- Mandrill (Plugin) – From MailChimp, free account for up to 12,000 emails/month
- Mailgun (Plugin) – Owned by Rackspace, free account for up to 200 emails/day (~6000/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 but will need to set all your emails being sent to Plain Text instead of HTML.
If emails are being blocked by spam filters why is it not in my spam folder? ↑ Back to Top
This is because your spam filter is the last and final spam filter your email is filtered through, at that point it is typically going into spam based on your email client settings or based on how you mark other emails as spam. If your emails are denied by any other spam filter before that it simply is not delivered at all.
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 just looking for Nigerian Princes and other typical spam emails. Spam filters are checking the IP address the email came from, the sending user and domain, the amount of email that IP/sender has been sending, how many times emails from that sender have been put into spam by email recipients, and everything down to the wording of your emails. The most common factor is where the email is being sent from, that brings your overall score with spam filters down low enough that even minor differences in the wording and formatting of the WooCommerce emails will be flagged as SPAM and not sent.
Resources ↑ Back to Top
Here are some helpful resources that can get you on your way to sending email reliably.
SenderScore by ReturnPath
Check and monitor the reputation of your websites IP address for sending emails. Excellent service if you have your own dedicated server for sending emails. You can also use this for shared and virtual hosting environments but since those environments are not recommended for sending emails at all it is better to get a dedicated SMTP provider instead.