I searched this and got it. Worked fine. Only problem was below code line.
$this->email->set_newline("\r\n");
If you miss it code wont work
$config = array(
'protocol' => 'smtp',
'smtp_host'=>'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user'=>'username@gmail.com',
'smtp_pass'=>'password',
'mailtype' => 'html',
'charset'=> 'iso-8859-1',
);
$this->load->library('email',$config);
$this->email->from('user@gmail.com', 'Your Name');
$this->email->to('rec1@yahoo.com,rec2@gmail.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->set_newline("\r\n");
$this->email->send();
echo $this->email->print_debugger();
Simple as that
$this->email->set_newline("\r\n");
If you miss it code wont work
$config = array(
'protocol' => 'smtp',
'smtp_host'=>'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user'=>'username@gmail.com',
'smtp_pass'=>'password',
'mailtype' => 'html',
'charset'=> 'iso-8859-1',
);
$this->load->library('email',$config);
$this->email->from('user@gmail.com', 'Your Name');
$this->email->to('rec1@yahoo.com,rec2@gmail.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->set_newline("\r\n");
$this->email->send();
echo $this->email->print_debugger();
Simple as that
This comment has been removed by the author.
ReplyDelete