multipart/mixed
Posted: Fri May 16, 2008 6:30 pm
Does Swift not handle multipart mixed? I'm talking about a message with a structure like this:
MULTIPART/MIXED :: 7BIT
1 -- 0K :: TEXT/PLAIN :: 7BIT
2 -- 180K :: APPLICATION/PDF :: BASE64 :: A Test PDF.pdf
3 -- 0K :: TEXT/PLAIN :: 7BIT
Basically, the PDF is inline between the content of the two text parts, but when I add a text part, then the pdf, then the next text part, Swift seems to want to wrap it as a multipart/mixed within a multipart/alternative. (This could very well just be my bad coding, I've been banging my head on it for 3 days). Right now it still shows up correctly in Apple Mail, but since I'm trying to forward messages in largely the same form I got them in, I'd prefer that they not be wrapped as multipart/alternative when they weren't sent that way.
Also it's losing the filename right now, but that's my own fault I'm sure.
Here, with content replaced with [...], is what I get sent to me out of Swift:
MULTIPART/MIXED :: 7BIT
1 -- 0K :: TEXT/PLAIN :: 7BIT
2 -- 180K :: APPLICATION/PDF :: BASE64 :: A Test PDF.pdf
3 -- 0K :: TEXT/PLAIN :: 7BIT
Basically, the PDF is inline between the content of the two text parts, but when I add a text part, then the pdf, then the next text part, Swift seems to want to wrap it as a multipart/mixed within a multipart/alternative. (This could very well just be my bad coding, I've been banging my head on it for 3 days). Right now it still shows up correctly in Apple Mail, but since I'm trying to forward messages in largely the same form I got them in, I'd prefer that they not be wrapped as multipart/alternative when they weren't sent that way.
Also it's losing the filename right now, but that's my own fault I'm sure.
Here, with content replaced with [...], is what I get sent to me out of Swift:
Code: Select all
To: [...]
From: [...]
Reply-To: [...]
Subject: fff
Date: Fri, 16 May 2008 16:25:39 -0700
X-LibVersion: 3.3.2
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="_=_swift-447790849482e17f3735cc2.49469771_=_"
Content-Transfer-Encoding: 7bit
Message-ID: <20080516232539.21318.300265094.swift@admin2.[...].com>
This is a message in multipart MIME format. Your mail client should not
be displaying this. Consider upgrading your mail client to view this
message correctly.
--_=_swift-447790849482e17f3735cc2.49469771_=_
Content-Type: multipart/mixed; boundary="_=_swift-152836247482e17f3737820.33237384_=_"
Content-Transfer-Encoding: 7bit
--_=_swift-152836247482e17f3737820.33237384_=_
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Testing.
##REMOVELINK##
--_=_swift-152836247482e17f3737820.33237384_=_
Content-Type: application/pdf; charset=utf-8
Content-Transfer-Encoding: base64
[...]
--_=_swift-152836247482e17f3737820.33237384_=_
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
sdfsddfsf
--_=_swift-152836247482e17f3737820.33237384_=_--
--_=_swift-447790849482e17f3735cc2.49469771_=_--