我在创建测试库以发送电子邮件时遇到问题。这是我的代码:
class My_email {
public function my_send_mail() {
$CI =& get_instance();
$CI->load->library('email');
$CI->email->from('xxx@xxx.com', 'Sender name');
$CI->email->to('yyy@yyy.com');
$CI->email->subject('Test');
$CI->email->message('Testing');
return $CI->email->send();
}
}
我得到错误:
Call to undefined method My_email::from()