php codeigniter email library -


i'm having trouble here. why can't send email using smtp? error looks this. email bug

the code looks this

   $config = array(                     'protocol' => 'smtp',                     'smtp_host' => 'mail.email.com',                     'smtp_port' => 25,                     'smtp_user' => 'admin@email.com',                     'smtp_pass' => 'pass'                     );             $this->email->initialize($config);             $this->email->cc('admin@provider.net');             $this->email->set_mailtype('html');             $this->email->from('admin@provider.net', 'admin');  $this->email->send(); if(!$this->email->send()) {     show_error($this->email->print_debugger()); } 

code update:

$this->load->library('email'); $config = array(                       'protocol' => 'smtp',                       'smtp_host' => 'ssl://smtp.googlemail.com',                       'smtp_port' => 465,                       'smtp_user' => 'account@gmail.com',                       'smtp_pass' => 'password',                       'smtp_timeout' => '4',                       'mailtype'  => 'html',                        'charset'   => 'iso-8859-1'                 );                 $this->email->initialize($config);                 $this->email->set_newline("\r\n");                 //$this->email->set_mailtype('html');                 $this->email->cc('admin@email.co.id');                 $this->email->from('admin@email.co.id', 'admin');                 $this->email->to('email@email.com');                 $this->email->subject('test online');                 $this->email->message('test email');                 if(!$this->email->send())                 {                     echo $this->email->print_debugger();                 }                 else                 {                     echo 'sent';                 } 

and returned message.

unable send email using php mail(). server might not configured send mail using method.

try put smtp_port parameter '465' in quotes , change same address account using send mail.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -