WooCommerce not sending emails when used WP mail function

I have running basic ecommerce site setup with WooCommerce 2.5.5 (and WP 4.4.3) hosted on HostGator. Any of emails from WooCommerce are not sent by default. I have tested emails with Contact Form 7 and it works. Got Postman SMTP plugin and I was able to send WooCommerce emails using Google SMTP.

I have no idea why WooCommerce is not sending emails when used default (and working with other forms) WP mail function. Also I was able to send a test email via straight PHP.

Read More

$email_string = WC_Emails::get_from_address(); returns proper email address.

Also I have tested if there is an issue wit HTML emails by adding code below to the functions.php

function set_content_type($content_type){
    return 'text/html';
}
add_filter('wp_mail_content_type','set_content_type');

and used Contact Form 7 to test it – email made through so there is not related to the email content type.

Related posts

Leave a Reply

1 comment

  1. here i fount some thing that might be usefull for you “My contact form emails work, so why do WooCommerce emails get blocked?”

    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.