Magento邮件配置出现的问题

今天配置magento的邮箱,出现很多怪异的问题,找资料也未果,所以记录下来,希望能够帮到需要的人。

报错1

Warning: simplexml_load_string(): Entity: line 1: parser error : String not started expecting ' or "......

 

调试:

app/code/core/Mage/Core/Model/Layout/Update.php 在431行读取前加入

Mage::log(print_r($filename, true));

确保后台日志是打开的,在var/log/system.log里就能看到最新报错。

最后在exception.log中找到报错:

exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()' in D:\wamp\www\fish\lib\Zend\Mail\Transport\Sendmail.php:137

说是连不上服务器,最后才意识到,整个配置过程虽然尝试过163的SMTP服务,却没有配置发件人的邮箱密码!

Magento是使用原生态的php函数mail的!

既然默认不能使用别人的SMTP服务器,只有自己装个试试。于是下载了逍遥邮给本地环境安装了一下。。。。。

试一下,成功了!!!

 

     感动的泪牛满面,虽然是很基础的问题,但是终究没有在网上找到解决办法,还是比较失落,程序都开源了,程序员也要快快加入分享的大军中来。

 

posted @ 2014-01-03 19:08  jroy  阅读(500)  评论(0编辑  收藏  举报