pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

magento 不發送任何郵件,如何調試?

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

問題描述

Magento 不發送任何電子郵件,跨國,聯系表出錯??

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

 cannot send your mail at this moment

我檢查過

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

  • 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 '無法發送郵件.' 在/var/webshop/httpdocs/lib/Zend/Mail/Transport/Sendmail.php:137

推薦答案

當 Magento 沒有發送忘記密碼的電子郵件(但已向用戶報告)然后查看 /var/后,我遇到了這個問題log/exception.log 發現它產生的錯誤是:

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,發現拋出這個錯誤的代碼(第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();
}

在函數開始時添加了一些變量日志記錄,因為其中之一必須返回 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');

它創建了日志文件 /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 > 中修復它系統>配置>高級 >系統>郵件發送設置并將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.

現在可以了:)

這篇關于magento 不發送任何郵件,如何調試?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Override Magento Config(覆蓋 Magento 配置)
What would cause a print_r and/or a var_dump to fail debugging a variable?(什么會導致 print_r 和/或 var_dump 調試變量失敗?)
How to update custom options programatically in magento?(如何在 magento 中以編程方式更新自定義選項?)
Magento 404 on Admin Page(管理頁面上的 Magento 404)
Magento - get price rules from order(Magento - 從訂單中獲取價格規則)
Magento Change Product Page Titles to Include Attributes(Magento 更改產品頁面標題以包含屬性)
主站蜘蛛池模板: 单机除尘器 骨架-脉冲除尘器设备生产厂家-润天环保设备 | GEDORE扭力螺丝刀-GORDON防静电刷-CHEMTRONICS吸锡线-上海卓君电子有限公司 | 蜜蜂职场文库_职场求职面试实用的范文资料大全 | 商用绞肉机-熟肉切片机-冻肉切丁机-猪肉开条机 - 广州市正盈机械设备有限公司 | 翅片管散热器价格_钢制暖气片报价_钢制板式散热器厂家「河北冀春暖气片有限公司」 | 钢托盘,铁托盘,钢制托盘,镀锌托盘,饲料托盘,钢托盘制造商-南京飞天金属13260753852 | 呼末二氧化碳|ETCO2模块采样管_气体干燥管_气体过滤器-湖南纳雄医疗器械有限公司 | 百方网-百方电气网,电工电气行业专业的B2B电子商务平台 | 暴风影音 | 不锈钢管件(不锈钢弯头,不锈钢三通,不锈钢大小头),不锈钢法兰「厂家」-浙江志通管阀 | 洗石机-移动滚筒式,振动,螺旋,洗矿机-青州冠诚重工机械有限公司 | 宁夏活性炭_防护活性炭_催化剂载体炭-宁夏恒辉活性炭有限公司 | 食品机械专用传感器-落料放大器-低价接近开关-菲德自控技术(天津)有限公司 | 郑州水质检测中心_井水检测_河南废气检测_河南中环嘉创检测 | 硅胶布|电磁炉垫片|特氟龙胶带-江苏浩天复合材料有限公司 | 重庆网站建设,重庆网站设计,重庆网站制作,重庆seo,重庆做网站,重庆seo,重庆公众号运营,重庆小程序开发 | 北京签证代办_签证办理_商务签证_旅游签证_寰球签证网 | 恒温恒湿试验箱厂家-高低温试验箱维修价格_东莞环仪仪器_东莞环仪仪器 | 防水套管|柔性防水套管|伸缩器|伸缩接头|传力接头-河南伟创管道 防水套管_柔性防水套管_刚性防水套管-巩义市润达管道设备制造有限公司 | STRO|DTRO-STRO反渗透膜(科普)_碟滤 | 蜘蛛车-高空作业平台-升降机-高空作业车租赁-臂式伸缩臂叉装车-登高车出租厂家 - 普雷斯特机械设备(北京)有限公司 | 真空泵维修保养,普发,阿尔卡特,荏原,卡西亚玛,莱宝,爱德华干式螺杆真空泵维修-东莞比其尔真空机电设备有限公司 | 聚合氯化铝价格_聚合氯化铝厂家_pac絮凝剂-唐达净水官网 | 闪蒸干燥机-喷雾干燥机-带式干燥机-桨叶干燥机-[常州佳一干燥设备] | 骨密度仪-骨密度测定仪-超声骨密度仪-骨龄测定仪-天津开发区圣鸿医疗器械有限公司 | 权威废金属|废塑料|废纸|废铜|废钢价格|再生资源回收行情报价中心-中废网 | 沥青车辙成型机-车托式混凝土取芯机-混凝土塑料试模|鑫高仪器 | 路面机械厂家| 咖啡加盟,咖啡店加盟连锁品牌-卡小逗 | 风淋室生产厂家报价_传递窗|送风口|臭氧机|FFU-山东盛之源净化设备 | 无锡网站建设-做网站-建网站-网页设计制作-阿凡达建站公司 | 岛津二手液相色谱仪,岛津10A液相,安捷伦二手液相,安捷伦1100液相-杭州森尼欧科学仪器有限公司 | 餐饮加盟网_特色餐饮连锁加盟店-餐饮加盟官网 | 锡膏喷印机-全自动涂覆机厂家-全自动点胶机-视觉点胶机-深圳市博明智控科技有限公司 | 庭院灯_太阳能景观灯_草坪灯厂家_仿古壁灯-重庆恒投科技 | 广州监控安装公司_远程监控_安防弱电工程_无线wifi覆盖_泉威安防科技 | 有福网(yofus.com)洗照片冲印,毕业聚会纪念册相册制作个性DIY平台 | 高柔性拖链电缆_卷筒电缆_耐磨耐折聚氨酯电缆-玖泰特种电缆 | 桑茶-七彩贝壳桑叶茶 长寿茶| 聚丙烯酰胺PAM-聚合氯化铝PAC-絮凝剂-河南博旭环保科技有限公司 巨野电机维修-水泵维修-巨野县飞宇机电维修有限公司 | 大通天成企业资质代办_承装修试电力设施许可证_增值电信业务经营许可证_无人机运营合格证_广播电视节目制作许可证 |