我正在尝试在codeigniter框架的控制器类中发送包含以下代码的电子邮件...
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('tanvir@soft-bd.com', 'tanvir@soft-bd.com');
$this->email->to('tanvir064@gmail.com');
$this->email->subject('This is an email test');
$this->email->message('It is working. Great!');
if ($this->email->send()) {
echo "Sent!";
$this->email->print_debugger();
} else {
echo "FAILED";
echo $this->email->print_debugger();
}
但显示以下错误
我的代码有什么问题?