为什么我的电子邮件功能在代码点火器中不起作用



此邮件功能不起作用。

在下面的代码中,$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();

试试这个:

$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";  

相关内容

  • 没有找到相关文章

最新更新