aschroder / Magento-SMTP-Pro-Email-Extension

Full SMTP and Gmail/Google Apps Email support for Magento
aschroder.com
334 stars 208 forks source link

Magento 1.9.3.1 send() Method compatibility #185

Open rajeev-k-tomy opened 7 years ago

rajeev-k-tomy commented 7 years ago

In the latest version of Magento ie 1.9.3.1, there is a code update in the class Mage_Core_Model_Email_Template which is like this:

if ($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {
        /** @var $emailQueue Mage_Core_Model_Email_Queue */
        $emailQueue = $this->getQueue();
        $emailQueue->clearRecipients();
        $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;
    }
} 

Here the line $emailQueue->clearRecipients(); is an additional line of code. This extension is rewriting the same class method as Aschroder_SMTPPro_Model_Email_Template::send(). So in order to make compatable with latest version, I believe this update has to be there in the rewriting file.

I want to know whether this step is necessary or not ?

jg-development commented 7 years ago

Hi, does the extension work for you with 1.9.3.1? Greetings Jan

rajeev-k-tomy commented 7 years ago

@jg-development Hey Jan, Yes it will work with the latest Magento version without any issues. However this upgrade which I mentioned in this thread has to be incorporated. I hope the maintainers of this extension will do that soon.

jg-development commented 7 years ago

@progammer-rkt : Thanks for the info.