Exception Magento 2:“;main.CRITICAL:异常消息:检测到无效的标头值;创建具有特殊个性的客户后

Exception Magento 2:“;main.CRITICAL:异常消息:检测到无效的标头值;创建具有特殊个性的客户后,exception,magento2,Exception,Magento2,在客户尝试使用其姓名中的特殊字符(口音)注册后,他/她收到以下消息“我们无法保存客户”。在debug.log中,我收到以下错误: [2020-01-02 12:11:19] main.CRITICAL: Exception message: Invalid header value detected Trace: <pre>#1 Zend\Mail\Header\AbstractAddressList->getFieldValue(true) called at [vendor

在客户尝试使用其姓名中的特殊字符(口音)注册后,他/她收到以下消息“我们无法保存客户”。在debug.log中,我收到以下错误:

[2020-01-02 12:11:19] main.CRITICAL: Exception message: Invalid header value detected
Trace: <pre>#1 Zend\Mail\Header\AbstractAddressList->getFieldValue(true) called at [vendor/zendframework/zend-mail/src/Header/AbstractAddressList.php:209]
#2 Zend\Mail\Header\AbstractAddressList->toString() called at [vendor/zendframework/zend-mail/src/Headers.php:427]
#3 Zend\Mail\Headers->toString() called at [vendor/zendframework/zend-mail/src/Message.php:546]
#4 Zend\Mail\Message->toString() called at [vendor/magento/framework/Mail/EmailMessage.php:217]
#5 Magento\Framework\Mail\EmailMessage->toString() called at [vendor/magento/framework/Mail/EmailMessage.php:209]
#6 Magento\Framework\Mail\EmailMessage->getRawMessage() called at [app/code/Mageplaza/Smtp/Mail/Transport.php:107]
#7 Mageplaza\Smtp\Mail\Transport->aroundSendMessage(&Magento\Email\Model\Transport\Interceptor#0000000051b4369900000000733b30a0#, &Closure#0000000051b436f900000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#8 Magento\Email\Model\Transport\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-email/Model/Mail/TransportInterfacePlugin.php:48]
#9 Magento\Email\Model\Mail\TransportInterfacePlugin->aroundSendMessage(&Magento\Email\Model\Transport\Interceptor#0000000051b4369900000000733b30a0#, &Closure#0000000051b436f900000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#10 Magento\Email\Model\Transport\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#11 Magento\Email\Model\Transport\Interceptor->___callPlugins('sendMessage', array(), NULL) called at [generated/code/Magento/Email/Model/Transport/Interceptor.php:26]
#12 Magento\Email\Model\Transport\Interceptor->sendMessage() called at [vendor/magento/module-customer/Model/EmailNotification.php:274]
#13 Magento\Customer\Model\EmailNotification->sendEmailTemplate(&Magento\Customer\Model\Data\Customer#0000000051b4362f00000000733b30a0#, 'customer/create_...', 'customer/create_...', array('customer' => &Magento\Customer\Model\Data\CustomerSecure#0000000051b434c000000000733b30a0#, 'back_url' => NULL, 'store' => &Magento\Store\Model\Store\Interceptor#0000000051b435c400000000733b30a0#), 1) called at [vendor/magento/module-customer/Model/EmailNotification.php:398]
#14 Magento\Customer\Model\EmailNotification->newAccount(&Magento\Customer\Model\Data\Customer#0000000051b4362f00000000733b30a0#, 'registered', NULL, 1) called at [vendor/magento/module-customer/Model/AccountManagement.php:963]
#15 Magento\Customer\Model\AccountManagement->sendEmailConfirmation(&Magento\Customer\Model\Data\Customer#0000000051b4362f00000000733b30a0#, NULL) called at [vendor/magento/module-customer/Model/AccountManagement.php:921]
#16 Magento\Customer\Model\AccountManagement->createAccountWithPasswordHash(&Magento\Customer\Model\Data\Customer#0000000051b4362f00000000733b30a0#, '2a93ede7eb5cddf6...', NULL) called at [generated/code/Magento/Customer/Model/AccountManagement/Interceptor.php:141]
#17 Magento\Customer\Model\AccountManagement\Interceptor->createAccountWithPasswordHash(&Magento\Customer\Model\Data\Customer#0000000051b434c500000000733b30a0#, '2a93ede7eb5cddf6...', NULL) called at [vendor/magento/module-customer/Model/AccountManagement.php:832]
#18 Magento\Customer\Model\AccountManagement->createAccount(&Magento\Customer\Model\Data\Customer#0000000051b434c500000000733b30a0#, 'HerrlichKraftvol...', NULL) called at [generated/code/Magento/Customer/Model/AccountManagement/Interceptor.php:128]
#19 Magento\Customer\Model\AccountManagement\Interceptor->createAccount(&Magento\Customer\Model\Data\Customer#0000000051b434c500000000733b30a0#, 'HerrlichKraftvol...', NULL) called at [vendor/magento/module-customer/Controller/Account/CreatePost.php:353]
#20 Magento\Customer\Controller\Account\CreatePost->execute() called at [generated/code/Magento/Customer/Controller/Account/CreatePost/Interceptor.php:50]
#21 Magento\Customer\Controller\Account\CreatePost\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#22 Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#23 Magento\Customer\Controller\Account\CreatePost\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#24 Magento\Customer\Controller\Account\CreatePost\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#25 Magento\Customer\Controller\Account\CreatePost\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#), array(array('designLoader', 'customerNotifica...', 'catalog_app_acti...', 'tax-app-action-d...', 'weee-app-action-...', 'customer_account', 'storeCheck', 'contextPlugin', 'customer-app-act...'), array('customer_account'))) called at [generated/code/Magento/Customer/Controller/Account/CreatePost/Interceptor.php:65]
#26 Magento\Customer\Controller\Account\CreatePost\Interceptor->dispatch(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/App/FrontController.php:159]
#27 Magento\Framework\App\FrontController->processRequest(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#, &Magento\Customer\Controller\Account\CreatePost\Interceptor#0000000051b4333b00000000733b30a0#) called at [vendor/magento/framework/App/FrontController.php:99]
#28 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#29 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#30 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94]
#31 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#0000000051b4317300000000733b30a0#, &Closure#0000000051b4315800000000733b30a0#, &Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#32 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:73]
#33 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#0000000051b4317300000000733b30a0#, &Closure#0000000051b4315800000000733b30a0#, &Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#34 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#35 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#), NULL) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#36 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#0000000051b4309c00000000733b30a0#) called at [vendor/magento/framework/App/Http.php:137]
#37 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#38 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#39 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#0000000051b430f100000000733b30a0#) called at [index.php:39]
[2020-01-02 12:11:19]main.CRITICAL:异常消息:检测到无效的标头值
Trace:#1 Zend\Mail\Header\AbstractAddressList->getFieldValue(true),在[vendor/zendframework/Zend-Mail/src/Header/AbstractAddressList.php:209]调用
#在[vendor/zendframework/Zend-Mail/src/Headers.php:427]调用2 Zend\Mail\Header\AbstractAddressList->toString()
#在[vendor/zendframework/Zend-Mail/src/Message.php:546]调用3 Zend\Mail\Headers->toString()
#在[vendor/magento/framework/Mail/EmailMessage.php:217]调用4 Zend\Mail\Message->toString()
#5在[vendor/Magento/Framework/Mail/EmailMessage.php:209]调用Magento\Framework\Mail\EmailMessage->toString()
#6在[app/code/Mageplaza/Smtp/Mail/Transport.php:107]调用Magento\Framework\Mail\EmailMessage->getRawMessage()
#7 Mageplaza\Smtp\Mail\Transport->aroundSendMessage(&Magento\Email\Model\Transport\Interceptor#00000000 51B43690000000733B30A0#,&Close#00000000 51B436F900007330B30A0#)在[vendor/Magento/framework/Intercepton/Interceptor.php:135]调用
#8 Magento\Email\Model\Transport\Interceptor->Magento\Framework\intercepton\{closure}()调用于[vendor/Magento/module Email/Model/Mail/TransportInterfacePlugin.php:48]
#9 Magento\Email\Model\Mail\TransportInterfacePlugin->aroundSendMessage(&Magento\Email\Model\Transport\Interceptor#00000000 51B43690000000733B30A0#,&Close#00000000 51B436F9000000733B30A0#)在[vendor/Magento/framework/Intercepton/Interceptor.php:135]调用
#10 Magento\Email\Model\Transport\Interceptor->Magento\Framework\intercepton\{closure}()调用于[vendor/Magento/Framework/intercepton/Interceptor.php:153]
#11在[generated/code/Magento/Email/Model/Transport/Interceptor.php:26]处调用Magento\Email\Model\Transport\Interceptor->\uuuuuuuuuuuuuu callPlugins('sendMessage',array(),NULL)
#12在[vendor/Magento/module customer/Model/EmailNotification.php:274]调用Magento\Email\Model\Transport\Interceptor->sendMessage()
#13 Magento\Customer\Model\EmailNotification->sendEmailTemplate(&Magento\Customer\Model\Data\Customer#00000000 51B4362F00000000733B30A0#,'Customer/create#','Customer/create#',数组('customer'=>&Magento\customer\Model\Data\CustomerSecure(00000000 51b434c00000000733b30a0),'back_url'=>NULL,'store'=>&Magento\store\Model\store\Interceptor(00000000 51b435c400000733b30a0)),1)在[vendor/Magento/module customer/Model/EmailNotification.php:398]调用
#14 Magento\Customer\Model\EmailNotification->newAccount(&Magento\Customer\Model\Data\Customer#00000000 51B4362F00000000733B30A0#,'registered',NULL,1)在[vendor/Magento/module Customer/Model/AccountManagement.php:963]调用
#15在[vendor/Magento/module Customer/Model/AccountManagement.php:921]调用的Magento\Customer\Model\Data\Customer\00000000 51b4362f00000000733b30a0#,NULL)sendmailconfirmation(&Magento\Customer\Model\Data\Customer#
#16 Magento\Customer\Model\AccountManagement->createAccountWithPasswordHash(&Magento\Customer\Model\Data\Customer\00000000 51b4362f00000000733b30a0),在[generated/code/Magento/Customer/Model/AccountManagement/Interceptor.php:141]调用'2a93ede7eb5cddf6',,NULL]
#17在[vendor/Magento/module Customer/Model/AccountManagement.php:832]处调用的Magento\Customer\Model\AccountManagement\Interceptor->createAccountWithPasswordHash(&Magento\Customer\Model\Data\Customer#00000000 51b434c500000733b30a0#,'2a93ede7eb5cdf6…',NULL)
#18 Magento\Customer\Model\AccountManagement->createAccount(&Magento\Customer\Model\Data\Customer\00000000 51b434c500000733b30a0),在[generated/code/Magento/Customer/Model/AccountManagement/Interceptor.php:128]调用'HerrlichKraftvol…',NULL]
#19 Magento\Customer\Model\AccountManagement\Interceptor->createAccount(&Magento\Customer\Model\Data\Customer\00000000 51b434c500000733b30a0),在[vendor/Magento/module Customer/Controller/Account/CreatePost.php:353]
#20 Magento\Customer\Controller\Account\CreatePost->execute()在[generated/code/Magento/Customer/Controller/Account/CreatePost/Interceptor.php:50]处调用
#21在[vendor/Magento/framework/App/Action/Action.php:108]调用Magento\Customer\Controller\Account\CreatePost\Interceptor->execute()
#22在[vendor/Magento/Framework/intercepton/Interceptor.php:58]调用Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#00000000 51b4309c0000000733b30a0)
#23在[vendor/Magento/Framework/Interception/Interceptor.php:138]调用的Magento\Customer\Controller\Account\CreatePost\Interceptor->\uuuuuuuuu callParent('dispatch',array(&Magento\Framework\App\Request\Http#00000000 51b4309c0000000733b30a0)
#24 Magento\Customer\Controller\Account\CreatePost\Interceptor->Magento\Framework\intercepton\{closure}(&Magento\Framework\App\Request\Http#00000000 51b4309c0000000733b30a0#)调用于[vendor/Magento/Framework/intercepton/Interceptor.php:153]
#25 Magento\Customer\Controller\Account\CreatePost\Interceptor->\uuuuuuuuuuuuCallPlugins('dispatch',array(&Magento\Framework\App\Request\Http#00000000 51b4309c0000000733b30a0),array(array在[generated/code/Magento/customer/Controller/account/CreatePost/Interceptor.php:65]处调用('designLoader'、'customerNotifica…'、'catalog\u app\u action…'、'tax-app-action-d…、'weee app action-…'、'customer\u account'、'contextPlugin'、'customer app act-act…)、数组('customer\u-account'))
#26在[vendor/Magento/Framework/App/FrontController.php:159]调用Magento\Customer\Controller\Account\CreatePost\Interceptor->dispatch(&Magento\Framework\App\Request\Http#00000000 51b4309c0000000733b30a0)
#27 Magento\Framework\App\FrontController->processRequest(&Magento\Framework\App\Request\Http#00000000 51B4309C00000000733B30A0),
public function toString(): string
    {
        $this->message->setEncoding('utf-8');
        return $this->message->toString();
    }
$this->message = $this->emailMessageInterfaceFactory->create($this->messageData);
$this->messageData['encoding'] = $mimePart->getCharset();
$this->messageData['encoding'] = $mimePart->getCharset();
$this->message = $this->emailMessageInterfaceFactory->create($this->messageData);

return $this;