-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Allow sending email to BCC address when not notifying user. #22810
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
Allow sending email to BCC address when not notifying user. #22810
Conversation
Hi @Hailong. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
* @return void | ||
*/ | ||
public function sendCopyTo() | ||
public function sendCopyTo($toBcc = false) |
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.
Unfortunately, we are not allowed to change public methods signature according to the Backward Compatible Development Guide.
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.
@dmytro-ch thanks for your review. But I assume if the class is not annotated by @api
, we can update the signature. This class is kind of an utility class used by other two classes in the same folder, which are annotated by @api
.
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.
@dmytro-ch I do think it's not the best idea to add this flag here too, but this the minimal change to fix this issue. But let me try with a better approach anyway.
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 just moved the check of CopyMethod
to the caller class, so that to avoid introducing the signature. It looks more clear this way.
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.
Updated the code to avoid modifying the method signature.
Hi @Hailong, |
a43c11a
to
3c6c58e
Compare
3c6c58e
to
08327f7
Compare
@dmytro-ch I just fixed the failures in UT. I also introduced two const in the |
Hi @Hailong, sorry for late reply and thanks for your patience! Unfortunately, it's not allowed to define new public constants. Please check the Semantic Version Checker build for reference. Could you please also update your working branch with the latest changes from mainline? Thank you! |
Thank you @dmytro-ch , I have just removed the newly added constants. Let's see how the checking goes this time. |
@dmytro-ch The build checks look good this time, can you please check? |
Hi @Hailong , |
Hi @engcom-Alfa , the conflict has been resolved. Thanks. |
Hi @sidolov, thank you for the review.
|
✔️ QA Passed |
Hi @Hailong, thank you for your contribution! |
Description (*)
Order Comments Email Copy would NOT be sent to the specified email address if the send method is set to
Bcc
, andNotify Customer by Email
is not checked when adding a comments from backbend.The expected behaviour is that whether the
Notify Customer by Email
is checked, an email copy is sent to the specified email. While now if theSend Order Comments Email Copy Method
config is set toSeparate Email
it goes well. But if the config is set toBcc
, the email can not be sent.The problem is that the
SenderBuilder
is used by both order notification and comments notification, so the fix is to add a flag to fix the problem for comments notification.Fixed Issues (if relevant)
Manual testing scenarios (*)
Send Order Comment Email Copy To
Send Order Comments Email Copy Method
.Notify Customer by Email
unchecked.Contribution checklist (*)