0

Please help me to configure mail settings in Magento

http://grapixmedia.in/raj/test_mag/ = demo link

While Creating a new account as new customer, I gave in the

System->Configuration->Customer->Customer Configuration

Send

Confirmation Key= Yes

But Account is getting created but the Confirmation key is not been sent to the mail which was given at the time of registration guyz please me

1

Did you check your cache? Seem it works fine. After login

  • Did u check your mail did u get a mail – lost_in_magento Jan 6 '15 at 15:25
  • Yeah, I didn't get it. But it could be a mail sending problem. Could you check this (for example from contact us)? – Kirby Jan 6 '15 at 17:32
  • I checked everythin bro... but couldn't figure out wat is the error – lost_in_magento Jan 6 '15 at 18:01
  • :) So, when you post a feedback via contact us form are you receiving an email into your valid email address which you set up in Admin Panel? – Kirby Jan 6 '15 at 18:03
0

Just override Account Controller...In magento like

<?xml version="1.0" encoding="utf-8"?>
<config>
    <modules>
        <Dev_Customcustomer>
            <version>1.0.0</version>
        </Dev_Customcustomer>
    </modules>
    <!-- start of override Customer AccountController -->

    <frontend>
        <routers>
            <customer>
                <args>
                    <modules>
                    <customcustomer before="Mage_Customer">Dev_Customcustomer</customcustomer>
                    </modules>
                </args>
            </customer>
        </routers>

    </frontend>

</config>

in controllers

create AccountController.php

look this method..
class Dev_Customcustomer_AccountController extends Mage_Core_Controller_Front_Action
{
public function confirmAction()
    {
        $session = $this->_getSession();
        if ($session->isLoggedIn()) {
            $this->_getSession()->logout()->regenerateSessionId();
        }
        try {
            $id      = $this->getRequest()->getParam('id', false);
            $key     = $this->getRequest()->getParam('key', false);
            $backUrl = $this->getRequest()->getParam('back_url', false);
            if (empty($id) || empty($key)) {
                throw new Exception($this->__('Bad request.'));
            }

            // load customer by id (try/catch in case if it throws exceptions)
            try {
                $customer = $this->_getModel('customer/customer')->load($id);
                if ((!$customer) || (!$customer->getId())) {
                    throw new Exception('Failed to load customer by id.');
                }
            }
            catch (Exception $e) {
                throw new Exception($this->__('Wrong customer account specified.'));
            }

            // check if it is inactive
            if ($customer->getConfirmation()) {
                if ($customer->getConfirmation() !== $key) {
                    throw new Exception($this->__('Wrong confirmation key.'));
                }

                // activate customer
                try {
                      // look this line from here 
                    $customer->setConfirmation(null);
                    $customer->save();
                    $customer->setStatus(1);
                    $customer->sendNewAccountEmail();
                     // to here 

                }
                catch (Exception $e) {
                    throw new Exception($this->__('Failed to confirm customer account.'));
                }

                $session->renewSession();
                // log in and send greeting email, then die happy
                $session->setCustomerAsLoggedIn($customer);
                $successUrl = $this->_welcomeCustomer($customer, true);
                $this->_redirectSuccess($backUrl ? $backUrl : $successUrl);
                return;
            }

            // die happy
            $this->_redirectSuccess($this->_getUrl('*/*/index', array('_secure' => true)));
            return;
        }
        catch (Exception $e) {
            // die unhappy
            $this->_getSession()->addError($e->getMessage());
            $this->_redirectError($this->_getUrl('*/*/index', array('_secure' => true)));
            return;
        }
    }

}

now this send confirmation mail to customer ......

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.