I have this very strange problem regarding the sending of the shipping confirmation email.

The cron task sales_send_order_shipment_emails kept failing, so I looked at the logs and I have this:

[2020-03-20 07:07:05] main.ERROR: Cron Job sales_send_order_shipment_emails has an error: Call to undefined method ArrayIterator::setType(). Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":190214144,"emalloc_start":172675232} [] []
[2020-03-20 07:07:05] main.CRITICAL: Error when running a cron job {"exception":"[object] (RuntimeException(code: 0): Error when running a cron job at /var/www/html/public_html/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:327, Error(code: 0): Call to undefined method ArrayIterator::setType() at /var/www/html/public_html/vendor/zendframework/zend-mail/src/Message.php:406)"} []

I looked at and got this:

$header->addParameter('boundary', $mime->boundary());

So I commented this 2 lines out and the blocked emails arrived, all of them fused together in a single email, this line was separating them:

 This is a message in Mime Format. If you see this, your mail reader does not support this format. --=_5a8c092ef2afea588e3cdba2658f0f49 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

So I thought that there must be something with the email template, but this wasn't touched since may last year.

Then I switched off the asynchronous sending mode, as there aren't too many orders now, but this is not a long term solution.

Any ideas where to start debug this?

We are on Magento 2.3.1.

| improve this question | | | | |
  • have u got any solution on this?? – gajjala sandeep Mar 25 at 16:21
  • No, still nothing. – Andras Mar 29 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.