
Untitled
By: a guest on
Aug 8th, 2012 | syntax:
None | size: 0.76 KB | hits: 8 | expires: Never
Code Igniter whats wrong with my code [closed]
class Email extends CI_Controller{
function __construct(){
parent::CI_Controller();
}
function index(){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'xxx',
'smtp_pass' => 'xxx'
);
$this->load->library('email', $config);
$this->email->set_newline("rn");
$this->email->from('xxx', 'name');
$this->email->to('xxx');
$this->email->subject('EMAIL TEST');
$this->email->message('Its working...');
if($this->email->send()){
echo 'Successfully sent.';
}
else{show_error($this->email->print_debugger())}
}
}
else{
show_error($this->email->print_debugger());
}