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

Confirmation emails have no FROM or FROM email address 2.2.4 #14952

Closed
tstamplis opened this issue May 3, 2018 · 258 comments
Closed

Confirmation emails have no FROM or FROM email address 2.2.4 #14952

tstamplis opened this issue May 3, 2018 · 258 comments
Labels
Component: Email Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@tstamplis
Copy link

tstamplis commented May 3, 2018

Preconditions

Magento 2.2.4
PHP 7.1
Cpanel Server

Steps to reproduce

Production Mode
Single Store Mode
Add product to cart
Checkout

Expected result

Order confirmation email with FROM name and email address sent to customer per settings from store email addresses in config

Actual result

Order confirmation email contains no FROM or FROM EMAIL address.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label May 3, 2018
@SamB-GB
Copy link

SamB-GB commented May 3, 2018

I can confirm I am also seeing this issue. In order to work around the problem I have had to force the FROM header from the php.ini file.

sendmail_path= "/usr/sbin/sendmail -t -i -f enter@emailaddresshere.com"

@chequille
Copy link

Have the same issue: Ticket #14945

@andy17612
Copy link

@SamB-GB So need to add the mine mail in the php.ini ?thank you

@chequille
Copy link

Hi @SambB-GB,
I guess this is a misunderstanding. gwharton closed my issue "Store Email Adresses are not used anymore" because it is the same as this one. It does not mean, that there will be no soultion for it.

Correct gwharton ?
BR Chequille

@gwharton
Copy link
Contributor

gwharton commented May 3, 2018

@chequille yes. The solution to both will be tracked under this issue. Having it tracked in two places will just lead to confusion.

@SamB-GB
Copy link

SamB-GB commented May 4, 2018

Yes thats correct @rigu12

@gwharton
Copy link
Contributor

gwharton commented May 5, 2018

This is the commit that introduced this bug.

f2bfdd9

Broken during fix applied for #11740

If you manually revert the changes in files according to that commit, you can get back to pre bug status.

app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php
lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php

@RomaKis What was this commit trying to achieve?

@jsdupuis
Copy link

jsdupuis commented May 7, 2018

Facing the same issue here in Magento 2.2.4. We have one website with 2 stores (Thai + English).

@ozziel
Copy link

ozziel commented May 7, 2018

I had the same issue. after 2.2.3 >2.2.4 update. We have 4 websites with 2 stores each.

I did as gwharton suggested, I used the 2 files from 2,2,3 and it's working correctly now from what I can tell.

Thank you!

@andy17612
Copy link

andy17612 commented May 7, 2018

so 2.2.4 recover 2.2.3 this file?? @ozziel
app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php
lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php

@ozziel
Copy link

ozziel commented May 7, 2018

You will have to recover them from their source folders:
NOTE: if you can't tell your restore function where to restore files and it restores them to the original path BE SURE TO BACKUP ORIGINALS ALREADY THERE FROM 2.2.4 before restoring
vendor/magento/module-sales/Model/Order/Email/SenderBuilder.php
vendor/magento/framework/Mail/Template/TransportBuilder.php

and then create the above folders and put them there
app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php
lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php

Keep in mind that this overrides magento default functions so if and when the corrections are made, you will need to remove these to use default functions again.

Hope this helps.

@jsdupuis
Copy link

jsdupuis commented May 8, 2018

I did as ozziel suggested (thanks for pointing to the vendor folder where my files were) and it fixed the problem.

@littlescrat
Copy link

Correct. The fix by @ozziel worked for me too.
I hope there will come up a patch for this issue.

@sashas777
Copy link
Contributor

Have you tried to switch to any SMTP module if it would fix the issue until Magento patch will be available?

@littlescrat
Copy link

I have installed the module "Mageplaza_Smtp" and i tried "MagePal_GmailSmtpApp". Both gave me a blank from-sender. But that is obvious, because the problem is much further in the procedure. See answer from ozziel, the paths.

@sashas777
Copy link
Contributor

Guys I made quick extension and forced it to be used only on Magento 2.2.4 version assume that bugfix will be in the next release.
I tested and it works on my websites. I hope it can help you as well:
https://github.com/sashas777/bug-from-email

You can install it using composer and then remove when will be new Magento 2 release. If you will forget to remove then you will have version compatibility error with any other Magento 2 release.

@rav-redchamps
Copy link
Contributor

rav-redchamps commented May 12, 2018

The problem is they created a new class

Magento\Framework\Mail\Template\TransportBuilderByStore

and correctly added FROM header to member "message" of the class.

But the "message" member of TransportBuilderByStore never used. Instead, the member "message" of the class TransportBuilder is getting used(which never updated with FROM email).

Moral of the story, they added FROM email correctly but never used it while sending the email.

The tiny extension by @sashas777 does the required job as of now.

@sashas777 Good Job!! Just one suggestion, it would be better if you can rename the folder 'Plugin' to 'Rewrite' or something else. Because the fix is done using class rewrite instead of the plugin. The folder name "Plugin" misleads ;-)

@rav-redchamps
Copy link
Contributor

rav-redchamps commented May 12, 2018

@sashas777 I did the required change and created a pull request. Please merge it if it makes sense 😃

@sashas777
Copy link
Contributor

@ravinders-121

Thanks - I updated the package.

@gwharton
Copy link
Contributor

Hi @bnymn I'm sorry i can't help with applying patches via composer, as I run from git.

However, if you scroll up through previous comments there is a downloadable patch for 2.2.8 and also some instructions (somewhere) on how to apply these. Unfortunately I can't help with this further.

I look forward to the 2.2.9 release when this issue can finally be put behind us!!! :)

@DanielRuf
Copy link
Contributor

@bnymn see #14952 (comment)

@iKoala
Copy link

iKoala commented May 14, 2019

This bug still exists in 2.3.0.

@gwharton
Copy link
Contributor

@iKoala Yes, Scheduled for 2.3.1 See #18471

@iKoala
Copy link

iKoala commented May 14, 2019

@iKoala Yes, Scheduled for 2.3.1 See #18471

@gwharton Thanks for the reply. Is there any work around at the meantime?

@seo99ita
Copy link

I had the same problem until 2.2.8.
I did an update installing 2.3.1 from scratch, the problem has been solved.

@good-geek
Copy link

fix ok only sales email, but not working in reset password or new customer or new user store

@gwharton
Copy link
Contributor

Please raise new issue to cover those bugs.

@msawyers
Copy link

See issue #23199

@salelsol
Copy link

Has someone upgraded and verified if the error continues in version 2.2.9?

@msawyers
Copy link

Yes, it continues and got worse on 2.3.1 and 2.3.2 @salelsol

@DanielRuf
Copy link
Contributor

DanielRuf commented Jun 28, 2019

#14952 (comment)

Please raise new issue to cover those bugs.

@lhall-amphibee
Copy link

lhall-amphibee commented Jun 28, 2019

I upgraded a store from 2.2.7 to 2.2.9 and the issue is fixed for me.

@salelsol
Copy link

salelsol commented Jul 8, 2019

  • It continues to work well and the emails are received correctly after upgraded to Magento 2.2.9 ??

@mike-jianxin-mo
Copy link

Got this issue after upgrading from 2.2.5 to 2.2.9.

@lhall-amphibee
Copy link

@mike-jianxin-mo it was working before and now you have the issue ? Maybe you should try to open a new issue ?

@rishabhchd19
Copy link

rishabhchd19 commented Jul 23, 2019 via email

@ramandhillon31
Copy link

Hi,

I'm using Magento Ver. 2.3.0.
The order confirmation email is coming from a very strange email address.
I have updated all the store email address.
Please advise.

Thank you,
Raman

@DanielRuf
Copy link
Contributor

Hi @ramandhillon31,

Please check the latest releases for the patch.
Also see #14952 (comment)

@msawyers
Copy link

msawyers commented Aug 7, 2019

@ramandhillon31

Fix will be in magento 2.3.3 version when it is released

@maxq
Copy link

maxq commented Nov 6, 2019

Anyone have a solution for 2.3? I tried overwriting some of the files with ones from 2.3.3 but looks like only option is to upgrade, however that usually means incompatibility with some extensions.

@DanielRuf
Copy link
Contributor

Please check the .patch URL of the linked PR. You may have to scroll a bit up. You can apply it with composer-patches.

@maxq
Copy link

maxq commented Nov 6, 2019

Still getting up to speed with M2 and Github, not sure where that is and what I'm looking for.

@hostep
Copy link
Contributor

hostep commented Nov 6, 2019

@maxq, a lot of useful comments were already posted above, but I get it that it takes a while to read through them, here are some highlights which might help you further:

For further questions or assistance about how to apply patches, you'd best switch over to https://magento.stackexchange.com/ or https://community.magento.com/

@maxq
Copy link

maxq commented Nov 8, 2019

I ended up using the composer patch MDVA-10993_EE_2.2.4_v1.composer.patch from Magento.
It says it's works up to 2.3 (maybe) but it did work for our 2.3 installation.
Thanks

@imebrijesh
Copy link

Guys I made quick extension and forced it to be used only on Magento 2.2.4 version assume that bugfix will be in the next release.
I tested and it works on my websites. I hope it can help you as well:
https://github.com/sashas777/bug-from-email

You can install it using composer and then remove when will be new Magento 2 release. If you will forget to remove then you will have version compatibility error with any other Magento 2 release.

Hi @hostep
This is not working for version 2.3.0... can you please help me to work for this version too?

@hostep
Copy link
Contributor

hostep commented Apr 15, 2020

@imebrijesh: if you are able to upgrade to a newer version of Magento, I would strongly recommend it, because this email bug is far from the only serious bug in version 2.3.0, later versions are a lot more stable (even though the still have other email bugs).

If you really need a patch, then I strongly recommend you learn how to create and apply patches, because you will need it a lot in this Magento universe where releases are only created every 3 months and every release contains new bugs.

If you have further questions, please refer to https://magento.stackexchange.com/ or https://community.magento.com/

@magento magento locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: Email Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests