久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

magento 不發(fā)送任何郵件,如何調(diào)試?

magento not sending out any mails, how to debug?(magento 不發(fā)送任何郵件,如何調(diào)試?)
本文介紹了magento 不發(fā)送任何郵件,如何調(diào)試?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

Magento 不發(fā)送任何電子郵件,跨國,聯(lián)系表出錯(cuò)??

Magento is not sending out any emails, transnational, contact form gives error

 cannot send your mail at this moment

我檢查過

  • magento 中的郵件設(shè)置,所有電子郵件帳戶都在設(shè)置中設(shè)置
  • php 郵件工作正常,帶有 php 郵件的 test.php 發(fā)送消息
  • 檢查了我的郵件服務(wù)器日志,但沒有看到任何錯(cuò)誤
  • /var/log/system.log 和 exception.log 只顯示錯(cuò)誤,而不是錯(cuò)誤原因

  • Mail setup in magento, all email accounts are set in settings
  • php mail works fine a test.php with php mail sends out a message
  • checked my mailserver logs but see nothing there no errors
  • /var/log/system.log and exception.log shows only an error not the cause of the error

異常 'Zend_Mail_Transport_Exception' 與message '無法發(fā)送郵件.' 在/var/webshop/httpdocs/lib/Zend/Mail/Transport/Sendmail.php:137

推薦答案

當(dāng) Magento 沒有發(fā)送忘記密碼的電子郵件(但已向用戶報(bào)告)然后查看 /var/后,我遇到了這個(gè)問題log/exception.log 發(fā)現(xiàn)它產(chǎn)生的錯(cuò)誤是:

I ran into this problem when Magento was not sending out forgot password emails (yet reporting it did to the user) then after looking in /var/log/exception.log found the error it was generating was:

2012-05-30T04:27:54+00:00 ERR (3): 
exception 'Exception' with message 'This letter cannot be sent.' in /home/magento/www/app/code/core/Mage/Core/Model/Email/Template.php:354
Stack trace:
#0 /home/magento/www/app/code/core/Mage/Core/Model/Email/Template.php(463): Mage_Core_Model_Email_Template->send(Array, Array, Array)
#1 /home/magento/www/app/code/core/Mage/Core/Model/Email/Template/Mailer.php(79): Mage_Core_Model_Email_Template->sendTransactional('customer_passwo...', 'support', Array, Array, Array, '1')
#2 /home/magento/www/app/code/core/Mage/Customer/Model/Customer.php(646): Mage_Core_Model_Email_Template_Mailer->send()
#3 /home/magento/www/app/code/core/Mage/Customer/Model/Customer.php(663): Mage_Customer_Model_Customer->_sendEmailTemplate('customer/passwo...', 'customer/passwo...', Array, '1')
#4 /home/magento/www/app/code/core/Mage/Customer/controllers/AccountController.php(554): Mage_Customer_Model_Customer->sendPasswordResetConfirmationEmail()
#5 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Customer_AccountController->forgotPasswordPostAction()
#6 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('forgotpasswordp...')
#7 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /home/magento/www/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#9 /home/magento/www/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#10 /home/magento/www/index.php(84): Mage::run('default', 'store')
#11 {main}

于是打開/app/code/core/Mage/Core/Model/Email/Template.php,發(fā)現(xiàn)拋出這個(gè)錯(cuò)誤的代碼(第354行)是:

So opened up /app/code/core/Mage/Core/Model/Email/Template.php and found the code that was throwing this error (on line 354) was:

if (!$this->isValidForSend()) {
    Mage::logException(new Exception('This letter cannot be sent.')); // translation is intentionally omitted
    return false;
}

所以看看isValidForSend():

public function isValidForSend()
{
    return !Mage::getStoreConfigFlag('system/smtp/disable')
        && $this->getSenderName()
        && $this->getSenderEmail()
        && $this->getTemplateSubject();
}

在函數(shù)開始時(shí)添加了一些變量日志記錄,因?yàn)槠渲兄槐仨毞祷?false:

Added some logging of the variables at the start of the function as one of these must be returning false:

Mage::Log(var_export(!Mage::getStoreConfigFlag('system/smtp/disable'),true).';'.var_export($this->getSenderName(),true).';'.var_export($this->getSenderEmail(),true).';'.var_export($this->getTemplateSubject(),true),null,'email.log');

它創(chuàng)建了日志文件 /var/log/email.log,其中有:

Which creates the log file /var/log/email.log which had:

2012-05-30T04:44:37+00:00 DEBUG (7): false;'CustomerSupport';'support@example.com';'Password Reset Confirmation for {{var customer.name}}'

所以問題是:!Mage::getStoreConfigFlag('system/smtp/disable') 你可以在 Admin > 中修復(fù)它系統(tǒng)>配置>高級(jí) >系統(tǒng)>郵件發(fā)送設(shè)置并將Disable Email Communications更改為No,以便禁用電子郵件.

So the problem was: !Mage::getStoreConfigFlag('system/smtp/disable') which you can fix up in Admin > System > Configuration > Advanced > System > Mail Sending Settings and change Disable Email Communications to No so the emails are NOT disabled.

現(xiàn)在可以了:)

這篇關(guān)于magento 不發(fā)送任何郵件,如何調(diào)試?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Override Magento Config(覆蓋 Magento 配置)
What would cause a print_r and/or a var_dump to fail debugging a variable?(什么會(huì)導(dǎo)致 print_r 和/或 var_dump 調(diào)試變量失敗?)
How to update custom options programatically in magento?(如何在 magento 中以編程方式更新自定義選項(xiàng)?)
Magento 404 on Admin Page(管理頁面上的 Magento 404)
Magento - get price rules from order(Magento - 從訂單中獲取價(jià)格規(guī)則)
Magento Change Product Page Titles to Include Attributes(Magento 更改產(chǎn)品頁面標(biāo)題以包含屬性)
主站蜘蛛池模板: 91狠狠操 | 日韩在线高清 | 黄色成人毛片 | 影音先锋中文字幕在线 | 一级国产片| 日韩欧美色 | 久久综合99 | 日韩精品三级 | 国产视频一区在线观看 | 伊人精品在线 | 欧美日韩免费 | 国产伦精品一区二区三区四区 | 国产精品偷乱一区二区三区 | 免费的毛片| 日韩中文字幕在线播放 | 长河落日电视连续剧免费观看 | 欧美69视频 | 天天射影院 | 成人欧美日韩 | 少妇av在线| 精品久久久久久久久久久 | 久久国产成人 | 丁香婷婷网 | 红桃av在线 | 国产精品自拍一区 | 成人午夜免费视频 | 日本精品在线视频 | 91爱视频| 极品在线视频 | 国产欧美在线播放 | 精品毛片一区二区三区 | 五月婷婷激情网 | 91理论片午午伦夜理片久久 | 国产免费黄色 | 在线观看的av网站 | 亚洲av毛片 | 激情高潮到大叫狂喷水 | 亚洲在线免费视频 | 日韩在线视频播放 | 不卡视频在线观看 | 四虎av在线|