Magento 2

How to Disable Welcome Email After Creating New Customer in Magento 2

Magento 2

How to Disable Welcome Email After Creating New Customer in Magento 2

Magento 2 provides this facility to send a welcome email to newly registered customers. Along with that, it also sends a welcome email if the admin adds a new customer from the admin panel!

But there may be a situation where you would not want to send a welcome email to the customers! Before start if you don't have a default module then you need to create it using this article 

Use the below programmatic solution and disable welcome email after creating a new customer in Magento 2 store.

Use the below code in the di.xml file at app/code/Vendor/Extension/etc/adminhtml

<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
 
    <type name="\Magento\Customer\Model\EmailNotification">
        <plugin name="disable-email-notification" type="Vendor\Extension\Plugin\EmailNotification" sortOrder="1"/>
    </type>
 
</config>

Use the below code in the EmailNotification.php file at app/code/Vendor/Extension/Plugin

<?php

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

 I hope this Magento article helped you to find what you were looking for.

Thanks