交易电子邮件停止工作 - Magento

时间:2017-02-04 16:31:02

标签: php email magento cron

我是新来的。 我的网站去年工作得很好,本周我做了两处修改: 1.-创建一个新的商店视图 2.-续订我的主机 之后所有magento电子邮件都停止发送。 电子邮件帐户定义明确 模板位于正确的文件夹中

我安装了AOE Scheduler,一切似乎都很好: AOE Scheduler 如果我检查表" core_email_queue"在数据库中正确创建条目 经过五分钟后,处理过#34; After cron execution

我还尝试使用以下代码直接发送电子邮件:

    <?php 
    ini_set( 'display_errors', 1 );
    error_reporting( E_ALL );
    $from = "x@gmail.com";
    $to = "x@gmail.com";
    $subject = "PHP Mail Test script";
    $message = "This is a test to check the PHP Mail functionality";
    $headers = "From:" . $from;
    mail($to,$subject,$message, $headers);
    echo "Test email sent";
?>

它有效。 我不知道还有什么可以尝试。 提前感谢您的帮助。

exception.log

2017-02-05T09:59:14+00:00 DEBUG (7): Exception message: This email address is already assigned to another user.
Trace: #0 /home/oo1lu856/public_html/app/code/core/Mage/Newsletter/controllers/SubscriberController.php(61): Mage::throwException('This email addr...')
#1 /home/oo1lu856/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Newsletter_SubscriberController->newAction()
#2 /home/oo1lu856/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('new')
#3 /home/oo1lu856/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#4 /home/oo1lu856/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#5 /home/oo1lu856/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 /home/oo1lu856/public_html/index.php(83): Mage::run('', 'store')
#7 {main}
2017-02-05T09:59:29+00:00 DEBUG (7): Exception message: This email address is already assigned to another user.
Trace: #0 /home/oo1lu856/public_html/app/code/core/Mage/Newsletter/controllers/SubscriberController.php(61): Mage::throwException('This email addr...')
#1 /home/oo1lu856/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Newsletter_SubscriberController->newAction()
#2 /home/oo1lu856/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('new')
#3 /home/oo1lu856/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#4 /home/oo1lu856/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#5 /home/oo1lu856/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 /home/oo1lu856/public_html/index.php(83): Mage::run('', 'store')
#7 {main}

SYSTEM.LOG

2017-01-31T21:59:49+00:00 ERR (3): Warning: simplexml_load_string(): (null)Entity: line 2: parser error : out of memory error  in /home/oo1lu856/public_html/lib/Varien/Simplexml/Config.php on line 383
2017-01-31T21:59:49+00:00 ERR (3): Warning: simplexml_load_string(): tem&gt;*&lt;/to_order_item&gt;&lt;/weee_tax_applied&gt;&lt;weee_tax_applied_amount&gt;&lt;to_order_item&gt;  in /home/oo1lu856/public_html/lib/Varien/Simplexml/Config.php on line 383
2017-01-31T21:59:49+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /home/oo1lu856/public_html/lib/Varien/Simplexml/Config.php on line 383
2017-01-31T21:59:49+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 2: parser error : xmlSAX2Characters  in /home/oo1lu856/public_html/lib/Varien/Simplexml/Config.php on line 383
2017-01-31T21:59:49+00:00 ERR (3): Warning: simplexml_load_string(): tem&gt;*&lt;/to_order_item&gt;&lt;/weee_tax_applied&gt;&lt;weee_tax_applied_amount&gt;&lt;to_order_item&gt;  in /home/oo1lu856/public_html/lib/Varien/Simplexml/Config.php on line 383
2017-01-31T21:59:49+00:00 ERR (3): Warning: simplexml_load_string():

1 个答案:

答案 0 :(得分:1)

避免使用cron解决。 似乎更新主机时服务器已更改,并且不允许运行cron.sh 托管服务提供商只提供更改为专用服务器,因为我的magento商店的数量很少是没有意义的。因此,我通过编辑避免排队订单电子邮件:

/app/code/core/Mage/Core/Model/Email/Template.php Line:407(approximate) 

/*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;
}*/

不要编辑核心文件,在以下路径中创建新文件夹

/app/code/local/Mage/Core/Model/Email

并复制已编辑的template.php