0

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

2

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');
}
6
  • Hi, I have add the above code and confirmation email send successfully. But while click on the confirmation button on email, show as "Bad request" – Rat Oct 12 '16 at 6:01
  • What is the url of that button? – Nidheesh Oct 12 '16 at 6:15
  • This is url confirmation link button. domain.com/customer/account/confirm/?back_url=&id=176 – Rat Oct 12 '16 at 6:19
  • registered will use the email template which has a confirmation key in it, and your configuration (System >> Configuration >> Customer >> Require Emails Confirmation = Yes for this. – Nidheesh Oct 12 '16 at 6:37
  • try the updated answer – Nidheesh Oct 12 '16 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.