'smtp', 'smtp_host' => "ssl://smtp.googlemail.com", 'smtp_port' => 465, 'smtp_user' => 'xxx', 'smtp_pass' => 'zzz' ); $this->load->library('email', $config); $this->email->set_newline("\r\n"); $this->email->from('xxx@gmail.com', 'Jack'); $this->email->to('yyy@gmail.com'); $this->email->subject('This is an email test'); $this->email->message('It is working. Great!'); if($this->email->send()) { echo 'Your email was sent, fool.'; } else { show_error($this->email->print_debugger()); } } }