CI中关于Email的问题
写了一个发送邮件的功能,但不知道为什么老报错,请大家帮忙解决一下!谢谢。。。控制器是这样写的: $config['protocol'] = 'smtp';
$config['smtp_host']= 'smtp.163.com'; $config['smtp_user']= 'temp@163.com';
$config['smtp_pass']= '***********';
$config['smtp_port'] = 25;
$config['wordwrap'] = TRUE;
$config['newline'] = "\r\n";
$config['crlf'] = "\r\n";
$this->email->initialize($config);
$this->email->to(temp2@163.com);
$this->email->from('temp@163.com','aa');
$this->email->subject('this Subject...');
$this->email->message('this Content...');
if($this->email->send())
{
echo "ok!!!!!";
echo $this->email->print_debugger();
}else{
echo "error!!!!";
echo $this->email->print_debugger();
}
报错的错误信息如下: error!!!!220 163.com Anti-spam GT for Coremail System (163com)
hello: 250-mail250-PIPELINING250-AUTH LOGIN PLAIN250-AUTH=LOGIN PLAIN250 8BITMIMEfrom: 550 用户被锁定The following SMTP error was encountered: 550 用户被锁定
to: 503 bad sequence of commandsThe following SMTP error was encountered: 503 bad sequence of commands
data: 503 bad sequence of commandsThe following SMTP error was encountered: 503 bad sequence of commands
502 Error: command not implemented
The following SMTP error was encountered: 502 Error: command not implemented
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniterDate: Sun, 5 Jul 2009 05:01:30 +0000To: sharon.wyg@163.comFrom: "sharon-st" Return-Path: Subject: zhutiReply-To: "sharon.wyg@163.com" X-Sender: sharon.wyg@163.comX-Mailer: CodeIgniterX-Priority: 3 (Normal)Message-ID: <4a5033aac87e1@163.com>Mime-Version: 1.0Content-Type: multipart/alternative; boundary="B_ALT_4a5033aac87fa"This is a multi-part message in MIME format.Your email application may not support this format.--B_ALT_4a5033aac87faContent-Type: text/plain; charset=utf-8Content-Transfer-Encoding: 8bitneirong--B_ALT_4a5033aac87faContent-Type: text/html; charset=utf-8Content-Transfer-Encoding: quoted-printableneirong--B_ALT_4a5033aac87fa-- 这个问题我也没遇见过 找hex来帮忙吧 对方 smtp 不让你发信。
这是对方 smtp 服务器的问题。请换成自己的 smtp 服务器,这个问题和 CI 无关。 哦,那就是我代码没问题了!
换一个允许的stmp服务器就可以了是吧? 谢谢管理员! 呵呵,换 smtp 没问题,但目前恐怕很少有 smtp 让你发信了,因为现在都是发垃圾邮件的,所以基本上都不会有让你发的。 2007年以后注册的163邮箱就已经不支持SMTP发信了,请确认你的邮箱是不是在那之前注册的。
或者换用其他支持SMTP的邮箱,比如搜狐的邮箱就可以。
页:
[1]