Aman Dhiman
Aman Dhiman

Reputation: 303

Order confirmation email not sending to customer?

I am using magento 1.9.1 version . After place successful order email not sending to customer.

if (false/\*$this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue\*/) {

 /** @var $emailQueue Mage_Core_Model_Email_Queue */
        $emailQueue = $this->getQueue();
        $emailQueue->setMessageBody($text);
        $emailQueue->setMessageParameters(array(
        'subject'  => $subject,
                'return_path_email' => $returnPathEmail,
                'is_plain'          => $this->isPlain(),
                'from_email'        => $this->getSenderEmail(),
                'from_name'         => $this->getSenderName(),
                'reply_to' => $this->getMail()->getReplyTo(),
                'return_to'=> $this->getMail()->getReturnPath(),
            ))
            ->addRecipients($emails, $names, Mage_Core_Model_Email_Queue::EMAIL_TYPE_TO)
            ->addRecipients($this->_bccEmails, array(), Mage_Core_Model_Email_Queue::EMAIL_TYPE_BCC);
        $emailQueue->addMessageToQueue();
      $order->getSendConfirmation(null);
$order->sendNewOrderEmail();
        return true;
    }` `

Upvotes: 2

Views: 2025

Answers (1)

Robin31
Robin31

Reputation: 86

Is your cron running? Magento is queuing this mails and the cron sends these mails since 1.9.1. This is done so that order placing goes faster since it doesn't need to wait on the mail sending.

Also see: https://stackoverflow.com/a/27458300/3992313

Upvotes: 1

Related Questions