我正在使用magento 1.9.1 version
。成功下单后,电子邮件不会发送给客户。
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;
}` `
答案 0 :(得分:1)
你的cron正在运行吗? Magento正在排队这封邮件,而cron从1.9.1开始发送这些邮件。这样做是为了使订单放置更快,因为它不需要等待邮件发送。