电子邮件发送在codeigniter上失败

时间:2015-10-25 15:44:16

标签: php codeigniter

兄弟, 当我尝试从parikshitpisal.com网站发送codeigniter 3中的电子邮件时遇到问题,同样的脚本在multidimensionsystems.com上工作正常。这是我的脚本。 http://pastebin.com/W4LjL5s8 我的调试输出是http://prntscr.com/8v5w4f 提前致谢

1 个答案:

答案 0 :(得分:1)

首先尝试使用此代码进行测试

 public function sendEmail(){
    //now copy and paste the below code
    $this->load->library('email');  
    $html = "Test email";
     $email_setting = array('mailtype'=>'html');
     $this->email->initialize($email_setting);
     $this->email->from('TEST');
     $this->email->to('the email address');
     $this->email->subject('Title': 'New email');
     $this->email->message($html);
     $this->email->send();
}

有关详细信息,请阅读本教程:http://w3code.in/2015/09/how-to-send-email-using-codeigniter/

相关问题