0
pratik posted
email subject not sending properly in CodeIgniter
doing email functionality for the forget password in CodeIgniterand i found a strange probelm.
when i get mail on subject it add some extra character which i did not add at subject.
following code i do for send e mail in codeignitor .
$config=array(
'charset'=>'utf-8',
'wordwrap'=> TRUE,
'mailtype' => 'html'
);
$config['newline'] = "\r\n";
$config['crlf'] = "\n";
$sub ='Reset password';
$this->email->initialize($config);
$this->email->to($data->email);
$this->email->from('Info@example.com','Example');
$this->email->subject($sub);
$encode=base64_encode($data->id."_".time());
$link = base_url()."home/reset/".$encode;
$this->email->message("Please click on below link to reset password.<br />".$link);
$this->email->set_crlf( "\r\n" );
$this->email->send();
i write there only Reset Password in subject line but it not sending proper subject.