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

CI中关于Email的问题

[复制链接]
发表于 2009-7-5 13:03:31 | 显示全部楼层 |阅读模式
写了一个发送邮件的功能,但不知道为什么老报错,请大家帮忙解决一下!谢谢。。。


控制器是这样写的:
      $config['protocol'] = 'smtp';
     $config['smtp_host']= 'smtp.163.com';     $config['smtp_user']= [email=]'temp@163.com'[/email];
     $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'[email=],'aa'[/email]);
       $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[20081010])
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--
发表于 2009-7-5 13:06:29 | 显示全部楼层
这个问题我也没遇见过 找hex来帮忙吧
发表于 2009-7-5 13:07:57 | 显示全部楼层
对方 smtp 不让你发信。
这是对方 smtp 服务器的问题。请换成自己的 smtp 服务器,这个问题和 CI 无关。
 楼主| 发表于 2009-7-5 13:11:32 | 显示全部楼层
哦,那就是我代码没问题了!

换一个允许的stmp服务器就可以了是吧?   谢谢管理员!
发表于 2009-7-5 13:14:13 | 显示全部楼层
呵呵,换 smtp 没问题,但目前恐怕很少有 smtp 让你发信了,因为现在都是发垃圾邮件的,所以基本上都不会有让你发的。
发表于 2009-7-5 21:34:22 | 显示全部楼层
2007年以后注册的163邮箱就已经不支持SMTP发信了,请确认你的邮箱是不是在那之前注册的。
或者换用其他支持SMTP的邮箱,比如搜狐的邮箱就可以。

本版积分规则