i'm trying to make sending email function using codeigniter but it doesn't work ,nothing is sent, there are any help?
This is my controller :
public function send_mail() {
$this->load->library('session');
$this->load->helper('form');
$this->load->view('admin/main/email_form.php');
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'xxxxxx@gmail.com',
'smtp_pass' => 'xxxxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE);
$from_email = "xxxxxxx@gmail.com";
$to_email = $this->input->post('email');
$subject = $this->input->post('subject');
$message = $this->input->post('message');
$this->load->library('email',$config);
$this->email->set_newline("\r\n");
$this->email->from($from_email);
$this->email->to($to_email);
$this->email->subject($subject);
$this->email->message($message);
$this->email->send();
}