Welcome Guest, Not a member yet? Register   Sign In
Html email being encoded as quoted-printable

G'day, im using the following code to send email

$html = "&lt;html&gt;&lt;body class='something'&gt;<p id='test'>Testing 123</p>&lt;/body&gt;&lt;html&gt;";

    'protocol' => 'sendmail',
    'mailtype' => 'html',
    'charset' =>'utf-8',
    'wordwrap' => FALSE,
$this->email->from('[email protected]');
$this->email->subject('Test subject');
$this->email->set_alt_message('Alternate Text');

The output of the email debugger is

Quote:User-Agent: CodeIgniter
Date: Tue, 31 Jul 2007 22:10:42 -0700
From: "XXX"
Subject: XXX
Reply-To: "XXX"
X-Sender: XXX
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0

Content-Type: multipart/alternative; boundary="B_ALT_46b015d2830f7"
This is a multi-part message in MIME format.
Your email application may not support this format.

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Alternate text

Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

&lt;html&gt;&lt;body class=3D'something'&gt;<p id=3D'test'>Testing 123</p>&lt;/body&gt;&lt;html&gt;


The problem is the html is being encoded as quoted-printable, which is messing up the html, is this an issue with Codeigniter, or with PHP ?

I have tried using mail, sendmail, and smtp to send email, with the same results.

Is there a way to force the encoding to not be quoted-printable ?


Ignore this, I misunderstood how to use html email

Hi, maybe I'm stupid, but please share your findings, 'cause I've got the same issue here. :cheese:

Thanks in advance.

I think the problem i had was that i had a stylesheet attached to the email, and was using classes and ids for css, and i thought that quoted printable was messing up the class and id names.

But the real problem was that some (most?) email clients just ignore attached stylesheets, so use embeded styles instead Smile

Thanks for your reply. I will take a look.

Theme © iAndrew 2016 - Forum software by © MyBB