Alvin丶D 发表于 2014-3-4 15:43:33

用ci发送电子邮件出错的问题

代码如下:
      function email_send()
      {
                $this->load->library('email');
                $config['protocol']='sendmail';
                $config['mailpath']='/usr/sbin/sendmail';
                $this->email->initialize($config);
                $this->email->from('someone@mysite.com','Alvin');
                $this->email->to('124658500@qq.com');
                $this->email->subject('Test');
                $this->email->message('email test');
                $this->email->send();

                echo $this->email->print_debugger();
      }

报错如下:
Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.

dayrui 发表于 2014-3-5 10:55:38

ci邮件类是有问题的,建议使用其他邮件发送类
页: [1]
查看完整版本: 用ci发送电子邮件出错的问题