Magento2: Disable email communication set to yes: email did get sent.

Created on 4 Aug 2016  路  13Comments  路  Source: magento/magento2

After installing a data migration tool I disabled all Email communication for all store-views. However, people who are subscribed to the newsletter received a confirmation e-mail with the basic Luma template without any data (see screenshot). Sender of email turned out to be [email protected].

Preconditions

  1. Magento CE 2.1.0
  2. PHP 7.0.9

    Steps to reproduce

  3. Installed module for data migration.

  4. Went to Store -> Configuration -> Advanced -> System -> Email Sending Settings
  5. Set Disable Email Communications to Yes.
  6. Checked on all store views if setting was disabled.
  7. Migrated Customers from Magento 1.9.2.4 to Magento 2.1.0.
  8. Received confirmation e-mail for subscription to a newsletter. Mails were sent to subscribers of 1 particular store view.
  9. Search for loggs or mailhistory to see what happend. There are no logs anywhere that tells me any email were sent.

    Expected result

  10. After migration no persons should receive any email when the option Disable Email Communication is set to Yes. Email wasn't even configured yet.

    Actual result

  11. [email protected] sent an email to all customers subscribed to the newsletter of the Magento 1 store, only showing (in Dutch) "You successfully subscribed to our newsletter."
    See screenshot (red marks are because of the store data there).
    newsletter_confirmation_jpg

Customer Ready for Work bug report

Most helpful comment

I've checked the magento 2 source. The only module wich seems the be looking a the value of the smtp_disable config is the newsletter module. It uses the isValidForSend method. The rest of the Magento 2 Emails does not use the setting and therefore always sends out emails. Not ideal in development type situations!! Please fix. Thanks

All 13 comments

Same here :
Set Disable Email Communications to Yes.
But order confirmation mails are being sent.

I've checked the magento 2 source. The only module wich seems the be looking a the value of the smtp_disable config is the newsletter module. It uses the isValidForSend method. The rest of the Magento 2 Emails does not use the setting and therefore always sends out emails. Not ideal in development type situations!! Please fix. Thanks

@Tristan-N
what exactly the tool do you use? Is it official Data Migration Tool from Magento or it is third party extension?

Did you use Magento`s Data Migration Tool ?

@Tristan-N I've created a email catcher. Wich also makes it possible to disable all email communication https://github.com/experius/Magento-2-Email-Catcher-Module

@ilol @victor-v-rad I did it once with the Migration tool from Magento and suffered this problem so I reinstalled the entire Magento installation and used LitExtension Cart Migration. With both migration tools the same problem.

@dheesbeen Thanks!

@victor-v-rad can you please check it?

Internal ticket created MAGETWO-59146. Thanks for reporting

The issue has been fixed and delivered to mainline

@slavvka Is this fix safe to integrate into a 2.1.1 production environment or is there a patch pending?

Hi @Ctucker9233, I think it is safe to apply the fix for both 2.0 and 2.1. Please see 34257ca and 5b5fd02 commits.

@magento-engcom-team This is fixed for 2.1x now correct? Has it been released in a particular version?

@Ctucker9233: by quickly looking at the class Magento\Email\Model\Plugin\TransportInterfacePlugin in various versions of 2.1, and I can see the class was introduced in version 2.1.8, and the release notes for 2.1.8 also mention this:

Magento no longer sends email when the Disable email communication setting is set to yes. Previously, Magento sent email even when this setting was enabled. GitHub-5988

So should be fixed in 2.1.x indeed! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreaskoch picture andreaskoch  路  3Comments

BenSpace48 picture BenSpace48  路  3Comments

kirashet666 picture kirashet666  路  3Comments

salelsol picture salelsol  路  3Comments

phirunson picture phirunson  路  3Comments