-
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
[2.3] Fix Store Emails - Missing From Name #18473
[2.3] Fix Store Emails - Missing From Name #18473
Conversation
Hi @gwharton. Thank you for your contribution. Adding new arguments to public methods is forbidden because of possible backward compatibility issues (https://devdocs.magento.com/guides/v2.2/contributor-guide/backward-compatible-development/#php). Instead of introducing new arguments to public methods you may mark the old method as deprecated and create a new one with all necessary parameters. Thank you |
Hi @rogyar I understand the need for that rule, however implementing a new function and deprecating the old one is problematic. I'll explain. Magento 2.2 code base uses a mixture of setFrom($email) and setFrom($email, $name) calls Magento 2.3 code base uses a mixture of setFrom($email) and setFrom($email, $name) calls This just looks like a plain mistake in the implementation of the setFrom routine in 2.3. If I was to add a new function setFromWithName($email, $name) then I would have to go through the entire codebase and find every calling of setFrom($email, $name) and changing it to the new function, further diverging the 2.2 and 2.3 codebases. I would have thought that common sense in this situation would allow the adding of a "default" parameter to the existing function, as this would mean that nothing would change anywhere else. Existing calls to setFrom($email) would continue unaffected and calls to setFrom($email, $name) would now work as designed. |
Hi @gwharton. I completely agree with your point. There might be a mistake during the initial implementation. |
@magento-engcom-team give me 2.3-develop instance |
Hi @rogyar. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @rogyar, here is your Magento instance. |
@gwharton could please let me know how to implement this fix on 2.3? We have set our email address mail@myemail.com but the clients got the email from storedep@server.webworksla.com that its a different server email account. Not sure why happen this. |
The Pull Request detailing the fix for 2.3.0 can be found here. This is scheduled to be included in the 2.3.1 release. |
Thanks sorry but could explain how to implement it?
… On Jan 23, 2019, at 9:50 AM, gwharton ***@***.***> wrote:
The Pull Request detailing the fix for 2.3.0 can be found here.
#18471 <#18471>
This is scheduled to be included in the 2.3.1 release.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#18473 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AD_TF-GjlsBryqRmpJJPcRnyirQ43x4Mks5vGHbNgaJpZM4XNf-d>.
|
@gwharton I patched all my 2.3 files with the PR 18471 and now still have this issue of no FROM NAME. Can you tell me how I can get that working for my customers as well? |
Hi @snoroozi You're almost there. This PR was combined into PR #18471 so the underlying fix should already be there. Note though, that any third party module that uses the $message->setFrom($emailaddress) function, will need to be updated to use the new $message->setFromAddress($emailaddress, $fromname) function introduced in #18471. Note #18471 updated all Magento functions but third party modules may not have implemented the fix yet, so you will have to do this manually with whichever modules you are using. Search in your modules for "setFrom" and adjust accordingly. |
OK. I'm trying this now. Thanks for getting back to me @gwharton
…On Tue, Mar 5, 2019 at 8:07 PM gwharton ***@***.***> wrote:
Hi @snoroozi <https://github.com/snoroozi> You're almost there. This PR
was combined into PR #18471
<#18471> so the underlying fix
should already be there. Note though, that any third party module that uses
the $message->setFrom($emailaddress) function, will need to be updated to
use the new $message->setFromAddress($emailaddress, $fromname) function
introduced in #18471 <#18471>.
Note #18471 <#18471> updated all
Magento functions but third party modules may not have implemented the fix
yet, so you will have to do this manually with whichever modules you are
using. Search in your modules for "setFrom" and adjust accordingly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18473 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQbJX1xpJsfxHbnl09bgmZVxTFkFJ2Vks5vTxTWgaJpZM4XNf-d>
.
|
@gwharton Like this? public_html$ grep -rin 'setFrom' app/ |
Are all of your emails missing a from name, or only ones related to Mageplaza gift card/Magebird Popup. |
All @gwharton |
And here's the vendor directory. But yes, even default magento emails are still missing |
Any thoughts @gwharton Mageplaza has offered up a fix in their smtp module that addresses most of these issues, but also some custom extensions not working. Maybe for same reason you say here. |
It seems mageplaza's solution is to reset the setFrom name function as a workaround in place of patching 2.3. Still it seems strange that none of my emails were working correctly after I did have this patch applied previously, don't you think? Or is it possible 3rd party modules could be interfering outside of their own module in the same way that amazon modules were affecting things for some merchants? |
The refactoring of the Framework/Mail/Message.php for Magento 2.3 does not implement the second parameter in the setFrom() function.
1st Parameter is email
2nd Parameter (missing) is from address
Description
This PR adds the missing from name to the setFrom function
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist