Welcome Guest, Not a member yet? Register   Sign In
html email still sending as text/plain
#11

[eluser]doubleplusgood[/eluser]
Hey,
The email sending at the very bottom is actually to send an email to an external service which in turn sends the user a text message to their mobile phone.
#12

[eluser]LuckyFella73[/eluser]
I noticed quite after posting that your are sending not the same
message at that lines ... sorry

Did you try the code?
#13

[eluser]doubleplusgood[/eluser]
No worries. Smile Tried the code but hasn't made any change and the print_debugger shows nothing. Sad
#14

[eluser]LuckyFella73[/eluser]
Very strange..

I now uploaded the script to our server and made a test. All
data you get by POST were hardcoded in my testfile for saving time reasons
and I replaced my email adresses in th debug text before posting here ..

Everything worked fine. Here my debug text:
Quote:Your message has been successfully sent using the following protocol: mail<br /><pre>User-Agent: CodeIgniter
Date: Fri, 1 Oct 2010 13:02:56 +0200
From: "SECRET" <[email protected]>
Return-Path: <[email protected]>
Reply-To: "Kalle" <[email protected]>
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4ca5bfe031bdf"

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

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

Hi Kalle,
The current list price on this bike is £21. OTR.
We are currently able to offer this bike at an astonishing: £15. OTR.
An amazing saving of: £6.
This price is only available whilst current stocks last.
Kalles bike description
Kind Regards
Sales Team


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

Hi Kalle,&lt;br /&gt;&lt;br /&gt;
The current list price on this bike is £21. OTR.&lt;br /&gt;&lt;br /&gt;

We are currently able to offer this bike at an astonishing: &lt;strong&gt;£1=
5. OTR&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;
An amazing saving of: &lt;strong&gt;£6&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;

This price is only available whilst current stocks last.&lt;br /&gt;&lt;br /&gt;
Kalles bike description&lt;br /&gt;
Kind Regards&lt;br /&gt;
Sales Team

--B_ALT_4ca5bfe031bdf--</pre>

So your script seems to work. I didn't change anything from the codeblock I posted back
besides the POST data lines.
#15

[eluser]doubleplusgood[/eluser]
Hey. I notice in yours that you also have Content-Type: text/plain; charset=utf-8. :S

This issue became apparent because the $description is some html formatted text coming from the database, which isn't displaying correctly in the email. Sad
#16

[eluser]LuckyFella73[/eluser]
When you look more closely at the debug text you will find both:
Content-Type: text/plain; charset=utf-8 and
Content-Type: text/html; charset=utf-8

As far as I know the plaintext version is send as well for e-mail clients
which are not able to render html mails ("multi-part message").

The text in my testmail was displayed correctly (ie pound sign). I think the debug
text is not displayed correct because I didn't set up a html header with
meta utf-8.

I checked my testmail (gmail) by clicking at "show original": there I can see
both versions (plain and html) - looks nearly like the debug msg from CI.

Edit: for I can see the "bold-parts" in my mail the html version obviously arrived..

Sorry that I don't have more ideas where to look or what could be wrong, hope that
informations help you to get on track




Theme © iAndrew 2016 - Forum software by © MyBB