Stop sending new account email

In the system configuration there are options and templates for various sales emails but there wasn’t one to stop the actual SENDING of the new account email.

Here’s a way to stop sending the welcome email to your new customer.

Copy:

app/code/core/Mage/Customer/Model/Customer.php

TO:

app/code/local/Mage/Customer/Model/Customer.php

In the function ‘¬†sendNewAccountEmail’ (around line 561), comment out the last 2 lines that perform the actual sending:


public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeId = '0')
{
$types = array(
'registered' => self::XML_PATH_REGISTER_EMAIL_TEMPLATE, // welcome email, when confirmation is disabled
'confirmed' => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE, // welcome email, when confirmation is enabled
'confirmation' => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE, // email with confirmation link
);
if (!isset($types[$type])) {
Mage::throwException(Mage::helper('customer')->__('Wrong transactional account email type'));
}

if (!$storeId) {
$storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
}

// $this->_sendEmailTemplate($types[$type], self::XML_PATH_REGISTER_EMAIL_IDENTITY,
// array('customer' => $this, 'back_url' => $backUrl), $storeId);

return $this;
}

 

Leave a Reply