Disable Welcome Email after signup

When customer sign in need to disable the email notification send from the netsuite.
For that create di.xml file

<type name="\Magento\Customer\Model\EmailNotification">
    <plugin name="disable-email-notification" type="Module\Model\Plugin\EmailNotification" sortOrder="1"/>
</type>

Then create the plugin

class EmailNotification
{
    public function aroundNewAccount(\Magento\Customer\Model\EmailNotification $subject, \Closure $proceed)
    {
        return $subject;
    }
}

Through this we can disable the emails sent from magento when the customer is registered.

Leave a comment

Your email address will not be published. Required fields are marked *