Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeigniter email not rendering as html in some clients
    primarykey
    data
    text
    <p>I have a web app that is sending emails via the code igniter mail library.</p> <p>I'm receiving reports that some customers are recieving the source code of the email rather than the rendedered html. This is not the case in gmail which appears to work fine.</p> <p>This is apparently how it renders in mac mail.</p> <pre><code>Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html lang=3D"en"&gt; &lt;head&gt; &lt;meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8"&gt; </code></pre> <p>I have set the content type like so:</p> <pre><code> $config['mailtype'] = 'html'; $config['protocol'] = 'sendmail'; </code></pre> <p>What's confusing is why it's only some clients that render like so.</p> <p><strong>EDIT:</strong></p> <p>Here is the PHP that sends the email. </p> <p>The client that is receiving them is also receiving html emails from shops etc perfectly fine.</p> <pre><code>private function sendQuoteEmail($id) { // Get request data based on $id and set variables for email $singleRecord = $this-&gt;vehicleRequests-&gt;fetch_by_id($id); $email = $singleRecord-&gt;email; $data = array( 'id' =&gt;$id, 'name'=&gt;$singleRecord-&gt;name, 'price' =&gt;$singleRecord-&gt;price, 'make' =&gt;$singleRecord-&gt;make, 'model' =&gt;$singleRecord-&gt;model ); // Send the email $config['mailtype'] = 'html'; $config['protocol'] = 'sendmail'; //$config['charset'] = 'iso-8859-1'; $this-&gt;email-&gt;initialize($config); $this-&gt;email-&gt;from('xxx@xxx.com', 'xxx'); $this-&gt;email-&gt;to($email); $this-&gt;email-&gt;subject('Your Quote'); $email = $this-&gt;load-&gt;view('email/quote_email', $data, TRUE); $this-&gt;email-&gt;message($email); $this-&gt;email-&gt;send(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload