Failure of "Send Order Email Copy" spams customers, every minute, forever. #17152
Labels
Component: Sales
Event: mm18hr
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
help wanted
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
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
Uh oh!
There was an error while loading. Please reload this page.
Magento 2.2.5 resends emails to customers if the "Send Order Email Copy" feature fails. This is due to a naive check in Magento\Sales\Model\Order\Email\Sender.php . It was PR #14051 to fix #13769 that did it.
It doesn't discriminate between a failure in the email copy (probably to a company address) and an email to a customer. If the copy fails repeatedly (I've literally never had this feature work) then it will spam your customers once a minute for ever. This is super dumb.
This is the code:
It should probably be:
Although really its a great demonstration of why using a boolean to determine an error state isn't a great idea.
Preconditions
Magento 2.2.5
Broken "Send Order Email Copy"
Asyncronous email sending
Steps to reproduce
Expected result
4 Don't spam customers
Actual result
The text was updated successfully, but these errors were encountered: