suzhisheng 发表于 2015-6-17 22:56:27

pcjingl 发表于 2015-6-16 12:49
这是我的邮件测试代码,你对照修改一下相关参数,我这里测试没问题(PHP5.5.20, CI3.0,QQ企业邮箱)




恩我觉得代码的配置应该是没问题的,可能是缺少什么服务支持

ahcheqiu 发表于 2015-6-18 12:13:25

suzhisheng 发表于 2015-6-17 22:52
开启啦,现在还是不行

The following SMTP error was encountered: 10060 �������ӷ���һ�� ...

这个错误代码好像是因为远程服务器没有响应,调一下浏览器的字符编码,看看这个具体提示是什么

suzhisheng 发表于 2015-6-18 14:22:44

ahcheqiu 发表于 2015-6-18 12:13
这个错误代码好像是因为远程服务器没有响应,调一下浏览器的字符编码,看看这个具体提示是什么
...

额那个乱码是调不了的。。。。,现在好像错误又不一样了。。。搞晕了

xc_Lemon 发表于 2015-7-23 16:34:29

//我的代码你看一下 是成功的
public function email(){
               $this->load->library('Email');   
      //以下设置Email参数
      $config ['mailtype'] = 'html';
                $config ['charset'] = 'utf-8';
                $config ['newline'] = '\r\n';
                $config ['protocol'] = 'smtp';
                $config ['smtp_host'] = 'smtp.163.com';            //163SMTP服务器地址
                $config ['smtp_user'] = 'xc_lemon@163.com';                        //邮箱地址
                $config ['smtp_pass'] = 'qtmlzameaghefrsq';                        //客户端授权码(手机短信)
                $config ['mailtype'] = 'html';                                                //邮件类型
                $config ['validate'] = true;                                                //是否验证邮箱地址
                $config ['priority'] = 1;                                                        //Email 优先级. 1 = 最高. 5 = 最低. 3 = 正常.
                $config ['crlf'] = "\r\n";                                                        //换行符
                $config ['smtp_port'] = 25;                                                        //SMTP端口
                $config ['charset'] = 'utf-8';                                                //gb2312会出现乱码
                $config ['wordwrap'] = TRUE;                                                 //开启自动换行
      $this->email->initialize($config);            
         
      //以下设置Email内容
      $this->email->from('xc_lemon@163.com', 'xc_lemon');                //发件人email地址和名称
      $this->email->to('1327503612@qq.com,xuchen@daoke.me');                                        //收件人的Email地址
      $this->email->subject('Email Test');                                                //主题
      $this->email->message('<font color=blue>哈哈哈哈哈哈哈哈哈哈哈哈</font>');//内容
      //相对于index.php的路径
                $this->email->attach('uploads/1_thumb.jpg'); //图片

      $this->email->send();
                echo $this->email->print_debugger();
        }
页: 1 [2]
查看完整版本: 邮件发送不成功