Home
Posted By: Virtual1 email forwarding inline pdf broken? - 03/14/12 03:14 PM
I received a flyer I needed to forward to a group. I sent it to myself, bcc the group list. I was surprised to see the MESS it made in my Sent Items. It inserted raw PDF crap (as viewed as text) inline instead of rendering the PDF

Here are the original headers as the attachment was received, and rendered correctly. This is from a "message, view, raw source":


------=_20120314095421_23565
Content-Type: text/plain; name="Fox Hunt Flyer.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Fox Hunt Flyer.pdf"

JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFu
Zyhlbi1VUykgL1N0cnVjdFRyZWVSb290IDIxIDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4+


and here's what Mail forwarded, again viewing raw source:


--Apple-Mail-17--900823720
Content-Disposition: inline;
filename="Fox Hunt Flyer.pdf"
Content-Type: text/plain;
name="Fox Hunt Flyer.pdf"
Content-Transfer-Encoding: base64

JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFu
Zyhlbi1VUykgL1N0cnVjdFRyZWVSb290IDIxIDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4+


Yep, that's right. "Content-Type: text/plain;", "Content-Disposition: inline;". Brilliant. Lets render that PDF file as TEXT !

I don't have time right now to figure out the specifics of this. Anyone else care to play and radar it? I suspect its due to the original not specifying a Content-Type, and Mail deciding to default to "text". Yet Mail displays it correctly when received...?
Yeah, seems like a Content-Type issue since it should be application/pdf.

Problem on the original sender's end. Garbage In Garbage Out.

I'd just try saving the pdf to the Finder, and remove the pdf from the forwarding email and then re-add it from the finder so it gets the proper content type.
Posted By: Virtual1 Re: email forwarding inline pdf broken? - 03/14/12 08:42 PM
Originally Posted By: Kevin M. Dean
Yeah, seems like a Content-Type issue since it should be application/pdf.

Problem on the original sender's end. Garbage In Garbage Out.

Normally I might agree on the GIGO error, but in this case it displays it correctly, showing it understands what the correct interpretation of the headers is. But then when sending the message by clicking Forward, it apparently completely rebuilds the attachments, and if no content type is specified, (and I don't think it's mandatory in the standard?) it sets it to "text", which then causes it to interpret its own creation wrong.

So it's a case of inconsistent behavior. Interpreting by filetype in one instance, and as always text in another.
© FineTunedMac