opencart smtp

2012-09-08   来源:站长日记       编辑:沧海桑田   类别:网店系统    转载到:    发表评论


一)尚未租用虚拟主机前,可使用gmail来作发送邮件的测试,步骤设定如下
(1)后台设定,系统管理 -> 选择商店[编辑] -> 择选「邮件主机」标籤
邮件协定: SMTP
SMTP主机: ssl://smtp.gmail.com
SMTP使用者: 你的邮件帐号@gmail.com
SMTP密码: 你的邮件密码
SMTP通讯埠: 465
SMTP逾时: 30

(2)因为gmail的邮件伺服器是使用SSL安全凭证,所以必须将php内的组态设定SSL开启
开启 php.ini
找到

01.;extension=php_openssl.dll
複製程式码将前面的分号「;」删除后存档,重新启动Apache

(二)租用虚拟主机后发送邮件的设定如下
(1)后台设定,系统管理 -> 选择商店[编辑] -> 择选「邮件主机」标籤
邮件协定: SMTP
SMTP主机: 看主机商给你的Email中,虚拟主机邮件设定内应该会写,若无请洽询主机商
SMTP使用者: 你的邮件帐号@你的网域名称 (ex.test@opencart.tw)
SMTP密码: 你的邮件密码
SMTP通讯埠: 25
SMTP逾时: 30

(2)在虚拟主机的控制面板(ex.cPanel)中必须在「邮件管理工具」先[新增帐号]

PS. 后台其它邮件设定中,「订单通知」建议勾选

1.Notice: Error: MAIL FROM not accepted from server!
have entered the smtp details on the admin panel -> settings -> Mail If i change the smtp to mail protocol, everything works fine, i get proper email.
But i want SMTP to work and send me proper email. Can anyone help me in this?

ANSWER
You probably need to contact OpenCart's support regarding this. Make sure your MIME header is defining the content as HTML
2.Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:456 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in systemlibrarymail.php on line 153
Notice: Error: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (139504100) in systemlibrarymail.php on line 156

解决方案一: 用 curl代替fsockopen
打开opent.php 把185行到241行注释掉
并把244行到291行的注释去掉
(PS:如果不能解决问题 请尝试下面的解决方案)

-------------------------------------------------
以下方案需要php.ini 修改权限(如果没有权限可以联系服务器管理员或空间运营商)
解决方案二
打开 php.ini找到
;extension=php_openssl.dll

;extension=php_curl.dll
把前面的分号去掉,重启IIS或APACHE问题解决

1

0
1|0 | 鲜花 VS 砸蛋 | 22阅读 0评论