Welcome Guest, Not a member yet? Register   Sign In
Bug (?) in a badly formatted mail message
#1

[eluser]smidiod[/eluser]
This is an esoteric bug, if it can count as a bug at all, but here goes:

When sending mail with an attachment, if the attached file is missing (a path error in my case) the email body gets screwed up and doesn't display. (I was using a multi-part, HTML message but I don't know if plain text is affected).

It's hardly high-priority but I thought it might be worth mentioning. Of course, if your code works, this "bug" never appears...

;-)
#2

[eluser]sophistry[/eluser]
hi smidiod,

"screwed up" is a pretty vague description for a bug report ;-) can you post the source of the email in question?

cheers.
#3

[eluser]smidiod[/eluser]
I'll replicate it if I can, but FWIW, the end user just gets what amounts to a blank email without the attachment.

BTW Sophistry, love the tree... I'm soooo jealous.
#4

[eluser]smidiod[/eluser]
OK, so here is a message with an attachment (where the attachment path is invalid and the programmer didn't spot the error ... d'uh!)

Quote:Subject: =?utf-8?Q?Test_with_broken_attach?=
User-Agent: CodeIgniter
Date: Tue, 5 May 2009 18:40:25 +0100
From: "Faircycle testbed" <[email protected]>
Reply-To: "[email protected]" <[email protected]>
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="B_ATC_4a007a09cae72"
X-Cloudmark-Analysis: v=1.0 c=1 a=f3KF1xABGwYA:10 a=zWdrAmO6HrYA:10 a=zlDW84ILT6cUjMvqIccA:9 a=HUOryjtR0cDrQyMghjxW2Gg72BkA:4

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

--B_ATC_4a007a09cae72
Content-Type: multipart/alternative; boundary="B_ALT_4a007a09caa96"

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

Dear bal bla bla,


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


--B_ALT_4a007a09caa96--
--B_ATC_4a007a09cae72--

And now, with the attachment removed for brevity - but the effect is the same if the path is valid.

Code:
Subject: =?utf-8?Q?Test_with_broken_attach?=
User-Agent: CodeIgniter
Date: Tue, 5 May 2009 18:42:53 +0100
From: "Faircycle testbed" <[email protected]>
Reply-To: "[email protected]" <[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_4a007a9d451eb"
X-Cloudmark-Analysis: v=1.0 c=1 a=f3KF1xABGwYA:10 a=zWdrAmO6HrYA:10 a=zlDW84ILT6cUjMvqIccA:9 a=HUOryjtR0cDrQyMghjxW2Gg72BkA:4 a=o9PM8HGNfBskj5mkJ4gA:9 a=D5SBOb9QXtBOQyXRaLgHPocyF2UA:4

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

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

Dear bal bla bla,


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

&lt;meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8" /&gt;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html&gt;&lt;p>Dear bal bla bla,</p>&lt;/html&gt;

--B_ALT_4a007a9d451eb--

There's obviously something going on here - even CI's forums aren't beautifying the code!

As I said, this is a very minor and esoteric bug ... but someone might want to attend to it.
#5

[eluser]codepotato[/eluser]
Think i've solved this here :
http://ellislab.com/forums/viewthread/69463/#811241
#6

[eluser]novice32[/eluser]
Not sure if this will solve your problem, but in my case, the boundary characters (--B_ALT_4cd9fda874c62--) would always show in the email footer when viewed in Outlook express (testing locally on Win 7, XAMPP). I read the Email.php core class to see how "send_multipart" is set. By default, it's TRUE. I set it to FALSE, and my boundary line no longer showed. While not in the CI User Guide as a parameter, you can set send_multipart just like the other settings (i.e.
Code:
$config_email['send_multipart'] = FALSE;
)




Theme © iAndrew 2016 - Forum software by © MyBB