Skip to content
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

Sender email not populated in Order emails for Magento 2.2.4 #65

Closed
Silarn opened this issue May 9, 2018 · 4 comments
Closed

Sender email not populated in Order emails for Magento 2.2.4 #65

Silarn opened this issue May 9, 2018 · 4 comments
Labels
Milestone

Comments

@Silarn
Copy link
Contributor

Silarn commented May 9, 2018

I'm still investigating the issue, but after upgrading our staging server our order emails seem to be failing due to no sender info getting set in the API call.

The test email does work, so the problem must be when it tries to pull the emails for the order.

@Silarn
Copy link
Contributor Author

Silarn commented May 11, 2018

This is caused by an addition the \Magento\Sales\Model\Order\Email\SenderBuilder which now uses two classes, the old TransportBuilder and a new TransportBuilderByStore, to set the data on the Message model. I'm not entirely sure why this works with the standard Zend_Mail class, but for this module it was causing two entirely separate instances of the Message class to be created. Since the main TransportBuilder manages creating the transport and dispatching the message, the data set by the TransportBuilderByStore was lost.

My current solution is to override the SenderBuilder class and instantiate the two TransportBuilders and the Message manually, passing the single Message instance to both models. This allows the data set by the TransportBuilderByStore to apply to the same message as the TransportBuilder and fixes the issue.

@Silarn
Copy link
Contributor Author

Silarn commented May 11, 2018

I'm working on a local fix and then I'll create a PR for this repo.

@Silarn Silarn changed the title Sender email not populated in Magento 2.2.4 Sender email not populated in Order emails for Magento 2.2.4 May 14, 2018
@klein0r
Copy link

klein0r commented May 24, 2018

Having the same issue. Have you fixed it @Silarn ?

@Silarn
Copy link
Contributor Author

Silarn commented May 24, 2018

See the associated PR

@centerax centerax added the 2.2 label May 24, 2018
@centerax centerax added this to the 3.1.0 milestone May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants