Fixing WooCommerce Emails Not Sending: A Technical Guide
1. Verify WooCommerce Email Settings
Ensure that the specific email notifications are enabled and correctly configured within WooCommerce itself.
- Navigate to
WooCommerce > Settings > Emails. - For each critical email type (e.g., "New Order", "Processing Order", "Customer Completed Order"):
- Click "Manage".
- Verify "Enable/Disable" is checked.
- Confirm the "Recipient(s)" field is accurate for admin notifications.
- Scroll to "Email Sender Options" at the bottom of the page. Ensure the "From" name and "From" address are correctly set. Mismatched "From" addresses can lead to emails being flagged as spam or rejected.
2. Implement a Reliable SMTP Solution
WordPress's default wp_mail() function often relies on the hosting server's PHP mail() function, which is inherently unreliable, prone to spam filtering, and frequently fails due to server misconfigurations or restrictions.
Solution: Configure WordPress to send emails via an authenticated SMTP (Simple Mail Transfer Protocol) server.
- Install an SMTP Plugin: Choose a reputable plugin like WP Mail SMTP, Post SMTP Mailer/Email Log, or Easy WP SMTP.
- Configure the Plugin: Use credentials from a dedicated SMTP service provider (e.g., SendGrid, Mailgun, SMTP.com, Brevo/Sendinblue) or your hosting/email provider's SMTP server.
- Key SMTP Settings to Verify:
- SMTP Host: The server address (e.g.,
smtp.sendgrid.net,smtp.mailgun.org). - SMTP Port: Commonly
465(for SSL encryption) or587(for TLS encryption). Port25is often blocked by hosting providers. - Encryption: Select
SSLorTLSmatching your port. - Authentication: Enable "Authentication" and provide the SMTP username and password. This is crucial for secure sending.
- SMTP Host: The server address (e.g.,
3. Test Your Email Configuration
After configuring an SMTP plugin, use its built-in email test feature to confirm basic sending functionality.
- Send a test email to a known working address (e.g., a Gmail or Outlook account).
- To test WooCommerce-specific emails:
- Place a test order on your site as a customer.
- Navigate to
WooCommerce > Orders. - Manually change the order status (e.g., from "Pending Payment" to "Processing" or "Completed"). This action typically triggers relevant customer and admin notification emails.
- Check the email logs provided by your SMTP plugin for delivery status and any error messages.
4. Check Server-Side and Hosting Issues
Even with correct settings, server-level restrictions can prevent emails from sending.
- Firewall Blocks: Your hosting provider's firewall might be blocking outgoing connections on standard SMTP ports (
25,465,587). Contact hosting support to verify these ports are open for your server. - PHP Configuration: Insufficient PHP memory limit or execution time can impact email processing. Check your server's PHP error logs for any related issues.
- Server IP Blacklisting: If your server's IP address is blacklisted by major email providers, emails may be rejected. This is less common when using a dedicated third-party SMTP service.
- Action: If issues persist, provide your hosting support with details of your SMTP configuration and any error messages from your email logs.
5. Address Email Deliverability (DNS Records)
If emails are sending but consistently landing in spam folders, it's often due to missing or incorrect DNS records that verify your domain's authenticity.
Implement/Verify these DNS records via your domain registrar or DNS provider:
- SPF (Sender Policy Framework): A TXT record specifying which mail servers are authorized to send emails on behalf of your domain.
(Replacev=spf1 include:spf.your-smtp-provider.com ~allspf.your-smtp-provider.comwith the actual include mechanism provided by your SMTP service). - DKIM (DomainKeys Identified Mail): A digital signature added to outgoing emails, verifying the sender and ensuring the email hasn't been tampered with. Your SMTP provider will supply the specific DKIM record (usually a TXT record with a unique hostname).
- DMARC (Domain-based Message Authentication, Reporting & Conformance): A policy that tells receiving mail servers what to do with emails that fail SPF or DKIM checks.
(v=DMARC1; p=quarantine; rua=mailto:your_email@example.comp=nonefor monitoring,p=quarantineto send to spam,p=rejectto block. Replaceyour_email@example.comwith an address to receive reports).
6. Rule Out Plugin/Theme Conflicts
Occasionally, another plugin or your active theme might interfere with WooCommerce's email functions or the wp_mail() hook.
- Deactivate all plugins except WooCommerce and your SMTP plugin.
- Switch to a default WordPress theme (e.g., Twenty Twenty-Four).
- Retest email sending by placing a new order or changing an order status.
- If emails send successfully, reactivate plugins and your theme one by one, testing after each activation, to identify the conflicting element.
Need this done? We handle this hands-on at GuardLabs — get in touch.
I take on freelance fixes and builds in this area.