用户
 找回密码
 入住 CI 中国社区
搜索
查看: 8125|回复: 6
收起左侧

用QQ的SMTP发送电子邮件失败是怎么回事

[复制链接]
发表于 2011-1-25 11:54:29 | 显示全部楼层 |阅读模式
代码如下                 
                        $config['protocol'] = 'smtp';
                        $config['smtp_host'] = 'smtp.qq.com';
                        $config['smtp_user'] = '******';
                        $config['smtp_pass'] = '******';
                        $config['charset'] = 'utf8';
                       
                        $this->email->initialize($config);

                        $this->email->from('sun988718@qq.com', 'dfsdf');
                        $this->email->to('912519717@qq.com');                       
                        $this->email->subject('Email Test');
                        $this->email->message('Testing the email class.');
                       
                        $this->email->send();
错误提示:
220 esmtp4.qq.com Esmtp QQ Mail Server

hello:

The following SMTP error was encountered:
Failed to send AUTH LOGIN command. Error:

from:

The following SMTP error was encountered:

to:

The following SMTP error was encountered:

data:

The following SMTP error was encountered:

The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
发表于 2011-1-25 12:15:17 | 显示全部楼层
QQ邮箱设置那 开了SMTP没
 楼主| 发表于 2011-1-26 09:59:48 | 显示全部楼层
接收邮箱都开了
发表于 2011-1-26 10:43:21 | 显示全部楼层
换163的再试试
 楼主| 发表于 2011-1-26 14:00:11 | 显示全部楼层
嗯,谢谢大家的帮忙,现在好了加了个 $config['mailtype' ]= 'html' ;
把smtp_user 的值由QQ号换成 邮箱地址@的前面的字符串
发表于 2011-1-27 09:40:47 | 显示全部楼层
快过年了,论坛也冷清了

怎么处理的,源码贴上来 look look
发表于 2013-3-27 11:44:10 | 显示全部楼层
a123123 发表于 2011-1-26 10:43
换163的再试试

163测试OK

本版积分规则