Sending email with gmail smtp with codeigniter email library

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

    func         


        
8条回答
  •  太阳男子
    2020-11-22 07:08

    $config = Array(
        'protocol' => 'smtp',
        'smtp_host' => 'ssl://smtp.googlemail.com',
        'smtp_port' => 465,
        'smtp_user' => 'xxx',
        'smtp_pass' => 'xxx',
        'mailtype'  => 'html', 
        'charset'   => 'iso-8859-1'
    );
    $this->load->library('email', $config);
    $this->email->set_newline("\r\n");
    
    // Set to, from, message, etc.
    
    $result = $this->email->send();
    

    From the CodeIgniter Forums

提交回复
热议问题