0

此邮件功能不起作用。

在下面的代码中,$tomail$frommail参数是正确的,但邮件没有到达我的 Gmail 帐户。

$this->load->library('email');

$config['mailtype'] = 'html';
$config['wordwrap'] = TRUE;

$this->email->initialize($config);
$this->email->to($to);
$this->email->from($from);
$this->email->cc($cc);
$this->email->subject($subject);
$this->email->message($message);
$this->email->send();
if ( ! $this->email->send())
{
    echo $this->email->print_debugger();
4

1 回答 1

0

试试这个:

$this->load->library('email');
 $config['mailtype'] = 'html';
 $config['protocol'] = 'sendmail';
 $this->email->initialize($config);  
 $this->email->from('yourmailid', 'Admin');
 $this->email->to($email);
 $this->email->subject('hello world');
 $this->email->message($body);

 if($this->email->send()) 
     echo "email send";  
于 2012-07-30T10:58:54.283 回答