Sending email with gmail smtp with codeigniter email library

后端 未结 8 2168
情书的邮戳
情书的邮戳 2020-11-22 06:29
load->library(\'email\');
    }

    func         


        
相关标签:
8条回答
  • 2020-11-22 07:15

    It can be this:

    If you are using cpanel for your website smtp restrictions are problem and cause this error. SMTP Restrictions

    Error while sending an email with CodeIgniter

    0 讨论(0)
  • 2020-11-22 07:25

    send html email via codeiginater

        $this->load->library('email');
        $this->load->library('parser');
    
    
    
        $this->email->clear();
        $config['mailtype'] = "html";
        $this->email->initialize($config);
        $this->email->set_newline("\r\n");
        $this->email->from('email@example.com', 'Website');
        $list = array('xxxxxxxx@archmage.lk', 'xxxxx@gmail.com');
        $this->email->to($list);
        $data = array();
        $htmlMessage = $this->parser->parse('messages/email', $data, true);
        $this->email->subject('This is an email test');
        $this->email->message($htmlMessage);
    
    
    
        if ($this->email->send()) {
            echo 'Your email was sent, thanks chamil.';
        } else {
            show_error($this->email->print_debugger());
        }
    
    0 讨论(0)
提交回复
热议问题