发送电子邮件模板codeigniter

时间:2018-01-17 10:53:16

标签: php codeigniter

我有codeigniter框架的代码。

我希望在“if condition”之后发送电子邮件模板,但它对我不起作用:

if ($this->input->post('status') == 1){

    $email_template = $this->emailtemplate_model->get_email_template(28);       

    $str_1 = str_replace($placeholders, $vals_1, $rawstring);

    $this -> email -> from($this->settings->site_email, $this->settings->site_name);
    $this->email->to(
        array($user['email'], $users['email'])
    );
    //$this -> email -> to($user['email']);
    $this -> email -> subject($email_template['title']);

    $this -> email -> message($str_1);

    $this->email->send();

} 

0 个答案:

没有答案