简体   繁体   中英

Woocommerce: How to debug problem related to new order email?

I used this solution to send emails to additional recipients with custom fields

Add recipients from product custom fields to Woocommerce new order email notification


However I do not receive any email. I turned on debug, debug log and debug display, but it does not show any error.

I think it could be error in mail service which I use to send order emails (I use Mail.ru SMTP). However it works without the code.

The question is how to find the problem?

UPD : I added to var_dump($recipient); die; var_dump($recipient); die; before return $recipient; and received an error in error_log:

string(45) "order@domain.name, email@domain.name, email2@domain.name"

UPD2 : I turned on email log in plugin settings, and received this technical details:

Date: Mon, 27 Apr 2020 09:56:35 +0000
To: order@domain.name, email@domain.name, email2@domain.name
From: Hello Hello <hello@domain.name>
Reply-To: A A <customer@domain.name>
Subject: [Domain.name]: New order #1234
Message-ID: <c2654ca64fd38e5061f7357d04b1XXXX@domain.name>
X-Mailer: WPMailSMTP/Mailer/smtp 1.9.0
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Unfortunately I did not receive any message in any of emails.

UPD3 : I installed email-log plugin to monitor email statuses, and it shows error in email which should be sent to order@domain.name, email@domain.name, email2@domain.name

I tried to turn off the script and manually added 2 emails in New Order settings in WooCommerce setting page. As a result, I do not receive any mails when I have more than 1 recipient.

I've written to support-team of biz.mail.ru and they kindly asked me to provide SMTP logs.

As a result, the script works well and in order to check it you can use code in UPD1.

I think I should look for ways how to log SMTP and solve this problem with the mail service provider.

In case the problem will be on my side I will update (or ask to update) this question. Kind regards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM