-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Symfony\Component\Mime\Exception\LogicException: The "Sender" header must be an instance of "Symfony\Component\Mime\Header\MailboxHeader" (got "Symfony\Component\Mime\Header\MailboxListHeader") #39823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @reficulddd. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @reficulddd, Thanks for your reporting and collaboration. We have tried to reproduce the issue in latest 2.4-develop instance and 2.4.8 instance and we are not able to reproduce the issue.After user is registered register email was sent successfully. ![]() Thanks. |
Hi @engcom-Bravo, did you set: It sends mail for me as well when set_return_path is 0 but doesn't send it if it's 1 or 2 |
Hi @reficulddd , Thanks for your reporting and collaboration. Steps to reproduce :
Hence Confirming the issue. Thanks. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-14520 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Delta. Thank you for verifying the issue. |
@magento I am working on this |
Hi @TomashKhamlai! 👋 |
@magento add to contributors team |
Hi @TomashKhamlai! 👋 |
@magento I am working on this |
Hi @reficulddd, Adobe Commerce Engineering team started working on this issue. We will reach out to you if we need more information and you will get notified once the issue is fixed. Please leave comments for any further questions. Thank you! |
Hello, As I can see this issue got fixed in the scope of the internal Jira ticket AC-14520 by the internal team Based on the Jira ticket, the target version is 2.4.9-alpha1. Thanks |
Preconditions and environment
Steps to reproduce
Expected result
User is registered, register email is sent
Actual result
User is registered, register email is not sent
Additional information
main.CRITICAL: Symfony\Component\Mime\Exception\LogicException: The "Sender" header must be an instance of "Symfony\Component\Mime\Header\MailboxHeader" (got "Symfony\Component\Mime\Header\MailboxListHeader"). in /var/www/users/magento-vanilla/src/www/vendor/symfony/mime/Header/Headers.php:244
Stack trace:
#0 /var/www/users/magento-vanilla/src/www/vendor/symfony/mime/Header/Headers.php(167): Symfony\Component\Mime\Header\Headers::checkHeaderClass()
#1 /var/www/users/magento-vanilla/src/www/vendor/symfony/mime/Header/Headers.php(84): Symfony\Component\Mime\Header\Headers->add()
#2 /var/www/users/magento-vanilla/src/www/vendor/magento/module-email/Model/Transport.php(245): Symfony\Component\Mime\Header\Headers->addMailboxListHeader()
#3 /var/www/users/magento-vanilla/src/www/vendor/magento/module-email/Model/Transport.php(222): Magento\Email\Model\Transport->setReturnPath()
#4 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Email\Model\Transport->sendMessage()
#5 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Email\Model\Transport\Interceptor->___callParent()
#6 /var/www/users/magento-vanilla/src/www/vendor/magento/module-email/Model/Mail/TransportInterfacePlugin.php(48): Magento\Email\Model\Transport\Interceptor->Magento\Framework\Interception{closure}()
#7 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Email\Model\Mail\TransportInterfacePlugin->aroundSendMessage()
#8 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Email\Model\Transport\Interceptor->Magento\Framework\Interception{closure}()
#9 /var/www/users/magento-vanilla/src/www/generated/code/Magento/Email/Model/Transport/Interceptor.php(23): Magento\Email\Model\Transport\Interceptor->___callPlugins()
#10 /var/www/users/magento-vanilla/src/www/vendor/magento/module-customer/Model/EmailNotification.php(308): Magento\Email\Model\Transport\Interceptor->sendMessage()
#11 /var/www/users/magento-vanilla/src/www/vendor/magento/module-customer/Model/EmailNotification.php(436): Magento\Customer\Model\EmailNotification->sendEmailTemplate()
#12 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Model\EmailNotification->newAccount()
#13 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Model\EmailNotification\Interceptor->___callParent()
#14 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Model\EmailNotification\Interceptor->Magento\Framework\Interception{closure}()
#15 /var/www/users/magento-vanilla/src/www/generated/code/Magento/Customer/Model/EmailNotification/Interceptor.php(23): Magento\Customer\Model\EmailNotification\Interceptor->___callPlugins()
#16 /var/www/users/magento-vanilla/src/www/vendor/magento/module-customer/Model/AccountManagement.php(999): Magento\Customer\Model\EmailNotification\Interceptor->newAccount()
#17 /var/www/users/magento-vanilla/src/www/vendor/magento/module-customer/Model/AccountManagement.php(957): Magento\Customer\Model\AccountManagement->sendEmailConfirmation()
#18 /var/www/users/magento-vanilla/src/www/vendor/magento/module-customer/Model/AccountManagement.php(869): Magento\Customer\Model\AccountManagement->createAccountWithPasswordHash()
#19 /var/www/users/magento-vanilla/src/www/generated/code/Magento/Customer/Model/AccountManagement/Interceptor.php(32): Magento\Customer\Model\AccountManagement->createAccount()
#20 /var/www/users/magento-vanilla/src/www/vendor/magento/module-customer/Controller/Account/CreatePost.php(380): Magento\Customer\Model\AccountManagement\Interceptor->createAccount()
#21 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Controller\Account\CreatePost->execute()
#22 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Account\CreatePost\Interceptor->___callParent()
#23 /var/www/users/magento-vanilla/src/www/vendor/magento/module-customer/Controller/Plugin/Account.php(64): Magento\Customer\Controller\Account\CreatePost\Interceptor->Magento\Framework\Interception{closure}()
#24 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Customer\Controller\Plugin\Account->aroundExecute()
#25 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Account\CreatePost\Interceptor->Magento\Framework\Interception{closure}()
#26 /var/www/users/magento-vanilla/src/www/generated/code/Magento/Customer/Controller/Account/CreatePost/Interceptor.php(23): Magento\Customer\Controller\Account\CreatePost\Interceptor->___callPlugins()
#27 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/App/Action/Action.php(111): Magento\Customer\Controller\Account\CreatePost\Interceptor->execute()
#28 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch()
#29 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Account\CreatePost\Interceptor->___callParent()
#30 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Account\CreatePost\Interceptor->Magento\Framework\Interception{closure}()
#31 /var/www/users/magento-vanilla/src/www/generated/code/Magento/Customer/Controller/Account/CreatePost/Interceptor.php(32): Magento\Customer\Controller\Account\CreatePost\Interceptor->___callPlugins()
#32 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/App/FrontController.php(245): Magento\Customer\Controller\Account\CreatePost\Interceptor->dispatch()
#33 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#34 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/App/FrontController.php(146): Magento\Framework\App\FrontController->processRequest()
#35 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#36 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#37 /var/www/users/magento-vanilla/src/www/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()
#38 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()
#39 /var/www/users/magento-vanilla/src/www/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(72): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()
#40 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#41 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()
#42 /var/www/users/magento-vanilla/src/www/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#43 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#44 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#45 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent()
#46 /var/www/users/magento-vanilla/src/www/vendor/magento/module-application-performance-monitor/Plugin/ApplicationPerformanceMonitor.php(38): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()
#47 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\ApplicationPerformanceMonitor\Plugin\ApplicationPerformanceMonitor->aroundLaunch()
#48 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()
#49 /var/www/users/magento-vanilla/src/www/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins()
#50 /var/www/users/magento-vanilla/src/www/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#51 /var/www/users/magento-vanilla/src/www/pub/index.php(29): Magento\Framework\App\Bootstrap->run()
#52 {main}
private function setReturnPath(SymfonyMessage $email): void
{
if ($this->isSetReturnPath === 2 && $this->returnPathValue) {
$email->getHeaders()->addMailboxListHeader('Sender', [$this->returnPathValue]);
} elseif ($this->isSetReturnPath === 1 &&
!empty($fromAddresses = $email->getHeaders()->get('From')?->getAddresses())) {
reset($fromAddresses);
$email->getHeaders()->addMailboxListHeader('Sender', [current($fromAddresses)->getAddress()]);
}
}
is fixable when changing
$email->getHeaders()->addMailboxListHeader('Sender', [$this->returnPathValue]);
to
$email->getHeaders()->addMailboxHeader('Sender', $this->returnPathValue);
and
$email->getHeaders()->addMailboxListHeader('Sender', [current($fromAddresses)->getAddress()]);
to
$email->getHeaders()->addMailboxHeader('Sender', current($fromAddresses)->getAddress());
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: