What is the right approach to disable Welcome Email after completes registration process. I'm using magento2.1. We have an integration with a customer management system and which will sent email to customer after registration. So we need to disable customer welcome email sent by Magento.
I created a custom module to disable mail communication. di.xml
<type name="\Magento\Customer\Model\Customer">
<plugin name="disable-email-confirmation" type="Company\Customer\Model\Plugin\Customer" sortOrder="1"/>
</type>
</xml>
Model/Plugin/Customer.php
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Company\Customer\Model\Plugin;
class Customer
{
public function aroundSendNewAccountEmail(\Magento\Customer\Model\Customer $subject, \Closure $proceed)
{
//$result = $proceed();
return $subject;
}
}
This is not working. I'm still getting emails. I see some email communcation refereces inside AccountManagementInterface.
vendor\magento\module-customer\etc\config.xml
What will happen if i comment<email_no_password_template>customer_create_account_email_no_password_template</email_no_password_template>
? Can't do?