Magento 2.3.3 将电子邮件副本发送到多个电子邮件时出现电子邮件问题
Magento 2.3.3 Email Issue When Sending Email copy to multiple email
我在 magento2 的电子邮件中遇到问题。此问题仅在 Magento 2.3.3 中遇到。
如何制作
转到
Store-> Configuration-> Sales-> Sales Emails -> Send Order Email Copy To -> enter multiple comma separated emails.
并更改发送订单电子邮件复制方法密件抄送到单独的电子邮件
现在打开任何订单并点击发送电子邮件您将在
中收到错误消息
TypeError:传递给 Magento\Email\Model\Template\Interceptor::setVars() 的参数 1 必须是数组类型,给定为空,在 /var/www/vendor/magento/framework/Mail/Template/TransportBuilder.php 上调用第 368 行
有人面对或解决过吗??
我找到了解决方法。
vendor/magento/module-sales/model/order/email/SenderBuilder.php
if (!empty($copyTo)) {
$this->configureEmailTemplate();
foreach ($copyTo as $email) {
$this->transportBuilder->addTo($email);
$transport = $this->transportBuilder->getTransport();
$transport->sendMessage();
将上面的代码替换如下
if (!empty($copyTo)) {
foreach ($copyTo as $email) {
$this->configureEmailTemplate();
$this->transportBuilder->addTo($email);
$transport = $this->transportBuilder->getTransport();
$transport->sendMessage();
注意:请不要在核心文件中做代码。
我在 magento2 的电子邮件中遇到问题。此问题仅在 Magento 2.3.3 中遇到。
如何制作
转到 Store-> Configuration-> Sales-> Sales Emails -> Send Order Email Copy To -> enter multiple comma separated emails.
并更改发送订单电子邮件复制方法密件抄送到单独的电子邮件
现在打开任何订单并点击发送电子邮件您将在
中收到错误消息TypeError:传递给 Magento\Email\Model\Template\Interceptor::setVars() 的参数 1 必须是数组类型,给定为空,在 /var/www/vendor/magento/framework/Mail/Template/TransportBuilder.php 上调用第 368 行
有人面对或解决过吗??
我找到了解决方法。
vendor/magento/module-sales/model/order/email/SenderBuilder.php
if (!empty($copyTo)) {
$this->configureEmailTemplate();
foreach ($copyTo as $email) {
$this->transportBuilder->addTo($email);
$transport = $this->transportBuilder->getTransport();
$transport->sendMessage();
将上面的代码替换如下
if (!empty($copyTo)) {
foreach ($copyTo as $email) {
$this->configureEmailTemplate();
$this->transportBuilder->addTo($email);
$transport = $this->transportBuilder->getTransport();
$transport->sendMessage();
注意:请不要在核心文件中做代码。