Welcome Guest, Not a member yet? Register   Sign In
CI generated email
#1

[eluser]onblur[/eluser]
I'm using CI 1.7 to send emails using smtp protocol. The email content is generated using views and uses simple html. Email is configured to send email as html. However, when viewing the received email, e.g. with gmail, it looks like the message below (exactly how it is displayed).

I'm not sure what is going on here. The views are simple, e.g.:

Code:
<html>
<body>
<p>Some copy here.</p>
<p>Maybe some more here.</p>
<p>Nothing fancy.</p>
&lt;/body&gt;
&lt;/html&gt;

Thanks.

Code:
Content-Type: multipart/alternative; boundary="B_ALT_49718b66e0888"

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



--B_ALT_49718b66e0888
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

TEST HEADING
--------------------------------

This is the test copy in here.

-------------------------------
http://mysite.com


--B_ALT_49718b66e0888
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

&lt;html&gt;
&lt;body&gt;
<p>TEST HEADING</p>
<p>--------------------------------</p>

<p>Community Hub user, onblur, thought you might be interested in the follo=
wing event listed on Community Hub.</p>

<p>This is the test copy in here.</p>

<p>&nbsp;</p>
<p>-------------------------------</p>
<p>http://mysite.com</p>

--B_ALT_49718b66e0888--
#2

[eluser]Hibiscus[/eluser]
I was running in to exactly the same problem. My fix was this:

In /system/libraries/Email.php change the following line:

Code:
$hdr = ($this->_get_protocol() == 'mail') ? $this->newline : '';

to:

Code:
$hdr = ($this->_get_protocol() == 'mail') ? '' : '';

Messages seem to come through okay in Gmail now.
#3

[eluser]winter[/eluser]
This should probably be done via the email config: newline

See: http://ellislab.com/codeigniter/user-gui...email.html

You probably don't want to hack the system libs if there is another way.
#4

[eluser]TheFuzzy0ne[/eluser]
It would be good if we could see how you've configured the Email class. Please can we see you controller?




Theme © iAndrew 2016 - Forum software by © MyBB