B-219 Sec-55 Noida, India
+918010221733

Send mail with queue in magento 1.9.2

Make copy /app/code/core/Mage/Core/Model/Email/Template.php
To
app/code/Local/Mage/Core/Model/Email/Template.php
Make the condition false near about line number 407
Current Code

if ($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();

            return true;
        }

After Update

if (1==2 ) {
            /** @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();

            return true;
        }

(Visited 198 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.