WC emails are HTML based and some providers struggle with this.
It makes sense as straight PHP testing code was able to sent an email with plain text.
Is there a way to test it if HostGator has problems to send HTML email?
Thanks
I have added that to the functions file:
function set_content_type($content_type){
return 'text/html';
}
add_filter('wp_mail_content_type','set_content_type');
and used Contact Form 7 to check if text/html email is going to make through and it did so issue is not related to the email content type but something else.
Thanks,
Adam
I’m not sure that the above code correctly determines if the host has a problem with the content or not.
Try changing all the emails to be sent in plain text, and see if they make it through or not: http://cld.wthms.co/12b8j/5aoXNq23
If you can’t solve the issue you can use a Transactional Mail Service :).
Some of them have free plans too. I have used Mandrill for a long-time, but now it is a paid feature in MailChimp and its costly.
My current favorite is SparkPost.
SendGrid is one the most popular services. SendIn Blue is a younger company but also offers nice services and plugins for WordPress. You can manage newsletters with it too.
You can check these articles too:
https://www.ventureharbour.com/transactional-email-service-best-mandrill-vs-sendgrid-vs-mailjet/
http://www.codeinwp.com/blog/mandrill-alternatives/
I have changed to plain text and is not work either
So its your server – stick to SMTP or use the email service for better reliability. Remember that on these shared hosts, if someone else on the same shared network as you gets blacklisted, you can be affected too π
for simply do this…
go to woocommerce > setting > email
enter this email in send from field wordpress@yourdomain.com (change yourdomain.com with your own domain name..)
if you want to use your own email id then do this
wordpress comes with its own cron sometimes it not work properly
do your own cron jobs…
click here to
i think it help if you need more help find me on speranza.in with livechat….
Satish – I have set that way from the begging (an email address with proper domain name).
Mike – problem is that hosting company is not providing full email logs to trace what is going on with email scripts
Anyway thanks for all help!
JackTheKnife is there a reason you don’t want to use SMTP or a service?