How do I disable notification emails in Magento?
How do I disable a particular notification email, for example the welcome email wh开发者_JAVA技巧en a user creates an account?
We can disable all email communication in Magento by
- Login to Magento backend
- Go to the System->Configuration menu.
- On the left hand menu under the Advanced tab (at the bottom) select the System menu item.
- Select ‘Mail Sending Settings’ from the selection on the right hand side.
- Set Disable email communications to ‘Yes’, then no email will send through Magento.
There is no buit-in ability to disable particular email notifications in Magento. I suggest you to look at the Mage_Core_Model_Email_Template::sendTransactional method. You can overload this class and add check against allowed/disallowed email notifications (based on template name).
Update: you can use extension for disabling specific email notifications in Magento 1.
Also, there is Disable Emails extension for Magento 2.
See:
admin/system_config/edit/section/sales_email/
You can enable/disable all the transaction emails as you want with the exception of the create account email.
I do not suggest that you disable the new account email. This is because it has their login details including password. It is not sent with guest checkout, maybe you need to make your store 'guest checkout only' if that is what you want.
This is a feature in the configuration settings as of Magento ver. 1.9.2.1 (maybe earlier)
System >> Configuration >> Sales Emails >> Enable/disable individual emails.
Magento 2.3:
Stores > Configuration > Advanced (at the bottom of the left vertical menu) > System
Then Mail sending settings > Disable Email Communications: Yes
Also, make sure you clear the cache from System > Cache management
There's another method, using the command line:
php bin/magento config:set system/smtp/disable 1
php bin/magento cache:flush
- 1 = Disable email sending
- 0 = Enable email sending
Inspired by @Mage_user 's question I created extension that allows to disable any email notification in Magento. So, @Bizboss you can use it to disable new order email.
In Magento 2.4.2, you can easily navigate to stores > settings > configuration. Then under Sales > Sales emails, you should be able to disable the notifications that you require.
精彩评论