CodeIgniter Forums
{unwrap} tags in plaintext, removed from html - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: {unwrap} tags in plaintext, removed from html (/thread-21428.html)



{unwrap} tags in plaintext, removed from html - El Forum - 08-10-2009

[eluser]Robert Wallis[/eluser]
Emails sent with {unwrap} tags will have the tags still in the plaintext version, but the HTML part does not have them:

Source
Code:
$this->email->clear();
        $this->email->from($this->config->item('email_support'));
        $this->email->to($this->member->email, $this->member->first_name.' '.$this->member->last_name);
        foreach($this->config->item('email_order_bcc') as $name=>$email) {
            $this->email->bcc($email, $name);
        }
        $this->email->subject('[...] Order #'.$this->menu_cart->id.' Confirmation');
        $data = array();
        $data['menu_cart'] = $this->menu_cart;
        $data['date_paid'] = strtotime($this->menu_cart->date_paid);
        $data['order_url'] = $this->config->item('ssl_base_url').'pay/complete/'.$this->menu_cart->id;
        $this->email->message($this->load->view('email/order_confirmation', $data, true));
        $this->email->send();

Email Source
Code:
...
User-Agent: CodeIgniter
Date: Mon, 10 Aug 2009 00:28:25 -0700
...
X-Sender: ...
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4a7fcc1902469"

This is a multi-part message in MIME format.
Your email application may not support this format.

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

Thank you for completing your order dated Monday, August 10th 2009
with ...! Your account will be charged $6.70.
Your order details can be found by clicking the link below:
{unwrap}https://www.example.com/long_url_goes_here_with_the/order/id{/unwrap}
Thanks!
- ... ...

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

<html>
<body>
<p>Thank you for completing your order dated <b>Monday, August 10th 2=
009</b> with ...! Your account will be charged $6.70.<p>
<p>Your order details can be found by clicking the link below:</p>
<div>https://www.example.com/long_url_goes_here_with_the/order/id</div>
<p>Thanks!</p>
<div>- <i>...</i> ...</div>
&lt;/body&gt;
&lt;/html&gt;

--B_ALT_4a7fcc1902469--



{unwrap} tags in plaintext, removed from html - El Forum - 08-10-2009

[eluser]Robert Wallis[/eluser]
Also here's the config/email.php

Code:
$config['crlf'] = "\r\n";
$config['newline'] = "\r\n";
$config['mailtype'] = 'html';