I have config email in codeigniter
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => '465',
'smtp_user' => '-----',
'smtp_pass' => '-----',
'mailtype' => 'html',
'charset' => 'utf-8'
$this->load->library('email', $this->session->userdata('config'));
$this->email->from('[email protected]', 'Rtlx Team');
$this->email->to($email);
$message = "Dear ";
$this->email->subject('Rtlx Team - Account Verification');
$this->email->message($message);
$this->email->send();
$this->email->clear();
But it shows following errors:
Message: mail() [function.mail]: Failed to connect to mail server at "localhost" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
Message: mail() expects parameter 1 to be string, array given
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
mailfunction.