Magento – Customer confirmation email resend

confirmationregister

How to resend the customer confirmation email (Register) through admin panel?
Is there any options for resending?.
Please help

Best Answer

There is no default option in magento to resend a account creation email. But you can achieve this by:

Rewrite the block classMage_Adminhtml_Block_Customer_Edit and add a new button in the constructor:

if ($this->getCustomerId()) {
    $this->_addButton('resendemail', array(
        'label' => Mage::helper('customer')->__('Resend Confimation Email'),
        'onclick' => 'setLocation(\'' . $this->getUrl('yourmodule/customer/resendEmail', array('customer_id' => $this->getCustomerId())) . '\')',
    ), 0);
}

Create your own custom controller action:

public function resendEmailAction() {
    $customerId = $this->getRequest()->getParam('customer_id', false);
    if ($customerId) {
        $customer = Mage::getModel('customer/customer')->load($customerId);

        if ($customer->isConfirmationRequired()) {
            $customer->sendNewAccountEmail('confirmation', '', $customer->getStoreId());
        } else {
            $customer->sendNewAccountEmail('registered', '', $customer->getStoreId());
        }
    }
    $this->_redirect('*/customer');
}