0
votes

I have configured the email function in my Codeigniter application with the following...

$config = [        
        'protocol' => 'smtp',
        'smtp_host' => 'smtp.xxxxx.com',
        'smtp_user' => 'xxxxx',
        'smtp_pass' => 'xxxxx',  
        'newline' => "\r\n",
        'smtp_port' => 587,
        'mailtype' => 'html',
        'charset' => 'UTF-8'
        ];

And sending using...

$sub = 'KONERU Created Sucessfully';
$msg = '<p><a href="koneru.com" >KONERU</a> - Has been Created Sucessfully!</p>';
$msg .= '<br><br><br><p>This mail Generated by computer.<br>Please Don\'t replay to this mail.</p>';
$this->load->library('email', $config);
$this->email->from('xxxxxxxxx','xxxxxxx xxxxxx');      
$this->email->to('xxxxxxxxxxxxxx');        
$this->email->subject($sub);
$this->email->message($msg);
$this->email->send();

Am able to send an email, but I didn't see HTML format properly on Outlook inbox, I am seeing something like this...

KONERU - Has been Created Su=essfully!


This mail Generated by c=mputer.
Please Don't replay to this mail.

I don't know why, I am seeing some '=' in-between text, I tried with different charset like UTF-8, iso-8859-1 but nothing seems to work.

If I use mailtype = 'text', then if I tried to send a plain text without HTML tags, I didn't see any '=' in between text.

1

1 Answers

0
votes

Yes, finally! by adding...

$this->email->set_crlf( "\r\n" ); 

to configuration, solved my problem.