-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
#14952 Confirmation emails have no FROM or FROM email address 2.2.4 #15119
Conversation
A revert does not seem to be the right solution. There was much code added and I guess one method or some lines are just missing. This is not how it should be fixed imho. |
Do you have any ideas what missing? I checked if TransportBuilder class used anywhere else and it doesn't seems to be used. |
I think we need to get some input from @RomaKis on what he intended to do on the original commit. Seems like it was incomplete, but was done for a reason. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the right solution imho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverting the changes is not the solution here.
@RomaKis |
@sashas777, you can check the review comments from this PR #11992. Correspond comment: |
@gwharton, I can't reproduce this issue. Steps:
Do I missed something? |
@RomaKis I'm not sure how your installation is working to be honest. A quick look at the code would indicate.
At no point is the transportBuilderByStore object ever used, apart from having its from address set in its own protected member $message. |
@gwharton and what is |
I don't follow. The ObjectManager's get() call in SenderBuilders constructor ensures that multiple instances of the SenderBuilder object all have the same transportBuilderByStore object, but does nothing to link it to the transportBuilder object. Please explain further. |
@gwharton, we have In |
Whereabouts? magento2/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php Lines 96 to 108 in 32892a4
magento2/lib/internal/Magento/Framework/Mail/Template/TransportBuilderByStore.php Lines 31 to 37 in 32892a4
magento2/app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php Lines 42 to 54 in 32892a4
|
If you will stop here
you will see that |
Besides the "From"... looks like "Return Path" missing from emails now? |
* | ||
* @return $this | ||
*/ | ||
public function setFromByStore($from, $store) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to avoid adding new public methods when not necessary. Every public method is a kind of contract for backward compatibility.
Changing setFrom
and adding an optional parameter could be a better option.
See https://github.com/magento/magento2/pull/16356/files trying to fix the same issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am facing the same issue , when a customer placed an order then customer is getting the mail but not admin.. And the second thing is that it is the taking the different host as my id is socketswitches@socket-switches.com but system is sending from socketswitches@ssdvps-80478.vps.net . ssdvps-80478.vps.net this is the server ..Any help!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had tried this code but isn't working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also facing same issue.. can you help in this ? My issue in 2.3
FYI: Adding a corss reference with another PR trying to fix the same issue: #16356 |
I am going to close this PR. There have been several PRs produced that are all trying to fix the same issue. I have collated everyones opinion and generated a new PR with full test coverage, Travis pass and Codacy pass. If you would like to collaborate further on this issue, you are encouraged to do so through PR #16461 |
Undone commit f2bfdd9 which caused issue
Description
Removed class lib/internal/Magento/Framework/Mail/Template/TransportBuilderByStore and assosiated tests for it.
The class cause the issue #14952 and was introduced because in previous releases default class lib/internal/Magento/Framework/Mail/Template/TransportBuilder didn't have the parameter $store for function public function setFromByStore($from, $store) Line 291.
Fixed Issues (if relevant)
Manual testing scenarios
When Magento has single store view: set values at the admin Store->Configuration->General->Store Email Addresses-> Sales Representative. Make an order from storefront then check in the order success email "name from" and "email from" fields. It supposes to be matched to the admin configuration.
When Magento has single store view: set values at the admin Store->Configuration->General->Store Email Addresses-> Sales Representative. Make an order from admin panel then check in the order success email "name from" and "email from" fields. It supposes to be matched to the admin configuration.
When Magento has multiple store views: set different values at the admin Store->Configuration->General->Store Email Addresses-> Sales Representative.
Create a new order from the storefront for each store view and look at your email to confirm these values in order confirmation email.
Create a new order from the admin for each store view and look at your email to confirm these values in order confirmation email.
Contribution checklist