0
votes

I send a mail using codeigniter.. When i receive a mail having unwanted "=" everywhere. Below are,

Phasellus dictum sapien a neque luctus cursus. Pellentesque sem do=or, fringilla et pharetra vitae. consequat vel lacus. Sed iaculis pulvinar=igula, ornare fringilla ante viverra et. In hac habitasse platea dictumst=. Donec vel orci mi, eu congue justo. Integer eget odio est, eget malesuada=orem. Aenean sed tellus dui, vitae viverra risus. Nullam massa sapien, pu=vinar eleifend fringilla id, convallis eget nisi. Mauris a sagittis dui. P=llentesque non lacinia mi. Fusce sit amet libero sit amet erat venenatis s=llicitudin vitae vel eros. Cras nunc sapien, interdum sit amet porttitor u=, congue quis urna.

CODE:

$config = Array(
            'protocol' => 'smtp',
            'smtp_host' => 'mail.****.com',
            'smtp_port' => 587,
            'smtp_user' => '*****@****.com',
            'smtp_pass' => '*****',
            'mailtype'  => 'html', 
            'charset'   => 'utf-8'
        );
        $this->load->library('email', $config);

        $this->email->set_newline("\r\n");
        $this->email->from('udh@****.com', 'Udhaya Kumar');
        $this->email->to('kat@****.com');
        $this->email->subject('Review Form Submitted');
        $data['name'] = "Udhaya Kumar V"; 
        $data['msg'] = "Thanks for submitting your review form. It has been submitted to <Manager name> for appraisal.";
        $message = $this->parser->parse("email.tpl",$data,TRUE);
        $this->email->message($message);
        $this->email->send();
1
Can you post the email you sent before sending (the one wrote or ...)Ali Almoullim

1 Answers

1
votes

it looks like your framework encodes the mail with the Quoted-Printable format (all non-ascii characters will be converted to =[hexnumber]) which is the defacto standard for mails. Can you please check, that the mail that is generated contains a Header that is:

Content-Transfer-Encoding: quoted-printable

if not, then a "simple" fix might be to just add that header to the mail and see if this fixes the issue. the more sophisticated fix would be to understand why this header is not added by your framework.