Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
Hi @paul-gene. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance - upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
https://github.com/magento/magento2/pull/23737 was supposed to fix an issue with multiple emails, but has apparently introduced the issue above.
I have tested on 2.3.3 and everything works as it should.
@magento give me 2.4-develop instance
Hi @ajithkumar-maragathavel. Thank you for your request. I'm working on Magento 2.4-develop instance for you
Hi @ajithkumar-maragathavel, here is your Magento instance.
Admin access: https://i-28419-2-4-develop.instances.magento-community.engineering/admin_8d8a
Login: 0116bbb5 Password: b20e2239b32e
Instance will be terminated in up to 3 hours.
@ajithkumar-maragathavel you have requested a 2.4 instance, but this is on 2.3.4, and I am not in a position to use 2.4.
@paul-gene I applied the revert.txt in my magento 2.3.4 and it works, but when a client creates his account he enters it without needing to confirm it, in my store I have activated the account confirmation and the confirmation email if it arrives, but when creating the account the clients access directly to your profile without confirming it
As I already mentioned in https://github.com/magento/magento2/issues/23729, I can reproduce it in 2.3.5 and 2.3.5p1
apparently this persists in magento 2.3.5 as well as magento 2.3.4
@magento give me 2.4-develop instance
Hi @Stepa4man. Thank you for your request. I'm working on Magento 2.4-develop instance for you
Hi, please be aware that receiving the email is not the major issue here, but the subscriber's status is unsubscribed regardless the chosen option in the registration form!
I have experienced this issue also in 2.3.5p1. The store is configured to require customer email confirmation. If a customer chooses to subscribe to the newsletter during registration, they receive the "Newsletter unsubscription success" email at the same time they receive the confirmation email and end up unsubscribed even after they confirm their email.
I looked into it and I believe the problem is in the Magento\Newsletter\Model\Subscriber class, specifically in the _updateCustomerSubscription function.
Around line 604 there are some if/else conditionals that are evaluated if the _updateCustomerSubscription function is run without the $subscribe parameter set.
There are currently three possible outcomes:
I believe there should be an additional elseif condition that checks to see if the newsletter status is STATUS_UNCONFIRMED and the customer has also not confirmed their registration, and if so - it should leave their status as STATUS_UNCONFIRMED. Without this additional check, an unconfirmed customer with unconfirmed newsletter status falls into the last else statement and is set to STATUS_UNSUBSCRIBED.
The solution would look something like this:
} elseif (($this->getStatus() == self::STATUS_UNCONFIRMED) && ($customerData->getConfirmation() === null)) {
$status = self::STATUS_SUBSCRIBED;
$sendInformationEmail = true;
} elseif (($this->getStatus() == self::STATUS_NOT_ACTIVE) && ($customerData->getConfirmation() === null)) {
$status = self::STATUS_NOT_ACTIVE;
} elseif (($this->getStatus() == self::STATUS_UNCONFIRMED) && ($customerData->getConfirmation() !== null)) {
// If the newsletter status is unconfirmed and our customer is unconfirmed, leave them unconfirmed
$status = self::STATUS_UNCONFIRMED;
} else {
$status = self::STATUS_UNSUBSCRIBED;
}
In testing, this modification caused the process to behave as expected. When the customer registered and chose to subscribe to the newsletter they would first receive the confirmation email, and upon successful confirmation they would then receive the "Newsletter Subscription Success" email, as expected.
Same issue on 2.3.5p1 and type registering of customer is confirmation email
Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop branchDetails
- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@tuyennn , @dwightc I'm not able to reproduce issue by steps you described on clean 2.4-develop and on the latest composer version 2.4.1
Manual testing scenario:

Sign Up for Newsletter checkbox
Result:
:heavy_check_mark: Newsletter subscription success and Welcome emails are sent


:heavy_check_mark: Customer is subscribed to newsletter


Are you able to reproduce this issue on the latest 2.4-develop branch?
Hello @engcom-Delta, thanks for checking into this.
I'm haven't had time to test it myself yet, but I did quickly look at the \Magento\Newsletter\Model\Subscriber class and I see that there have been significant changes made to it in 2.4.0 so it is likely that the issue has indeed been corrected.
I also looked at the code for 2.3.5p2 and 2.3.6, and I see that in those versions the code has not been changed, so I suspect the issue still exists in the 2.3.x versions.
I will test them when I can and will report back my results.
I was able to test versions 2.3.5p2 and 2.3.6. Here were my results:
2.3.5p2

2.3.6

I was not able to test 2.4+ at this time, but @engcom-Delta has done so above and has indicated that it works correctly there as well.
Hi @krishprakash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop branchDetails
- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @tuyennn. Not able to replicate the issue
Feel free to reopen the issue once you conform that issue is reproduce on latest magento 2.4- develop instance
Most helpful comment
I have experienced this issue also in 2.3.5p1. The store is configured to require customer email confirmation. If a customer chooses to subscribe to the newsletter during registration, they receive the "Newsletter unsubscription success" email at the same time they receive the confirmation email and end up unsubscribed even after they confirm their email.
I looked into it and I believe the problem is in the Magento\Newsletter\Model\Subscriber class, specifically in the _updateCustomerSubscription function.
Around line 604 there are some if/else conditionals that are evaluated if the _updateCustomerSubscription function is run without the $subscribe parameter set.
There are currently three possible outcomes:
I believe there should be an additional elseif condition that checks to see if the newsletter status is STATUS_UNCONFIRMED and the customer has also not confirmed their registration, and if so - it should leave their status as STATUS_UNCONFIRMED. Without this additional check, an unconfirmed customer with unconfirmed newsletter status falls into the last else statement and is set to STATUS_UNSUBSCRIBED.
The solution would look something like this:
In testing, this modification caused the process to behave as expected. When the customer registered and chose to subscribe to the newsletter they would first receive the confirmation email, and upon successful confirmation they would then receive the "Newsletter Subscription Success" email, as expected.