sunjingping 发表于 2011-1-25 11:54:29

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

代码如下               
                        $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.

lamtin 发表于 2011-1-25 12:15:17

QQ邮箱设置那 开了SMTP没

sunjingping 发表于 2011-1-26 09:59:48

接收邮箱都开了

a123123 发表于 2011-1-26 10:43:21

换163的再试试

sunjingping 发表于 2011-1-26 14:00:11

嗯,谢谢大家的帮忙,现在好了加了个 $config['mailtype' ]= 'html' ;
把smtp_user 的值由QQ号换成 邮箱地址@的前面的字符串

a123123 发表于 2011-1-27 09:40:47

快过年了,论坛也冷清了{:3_48:},

怎么处理的,源码贴上来 look look

city 发表于 2013-3-27 11:44:10

a123123 发表于 2011-1-26 10:43 static/image/common/back.gif
换163的再试试

163测试OK
页: [1]
查看完整版本: 用QQ的SMTP发送电子邮件失败是怎么回事