[ 
https://issues.apache.org/jira/browse/EMAIL-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425486#comment-17425486
 ] 

Theodosios Andreou edited comment on EMAIL-199 at 10/7/21, 2:13 PM:
--------------------------------------------------------------------

I can see what you mean in my last comment, but I can see that it does not 
follow that pattern in the example I gave in the description of this ticket. I 
would have expected to see something like this instead to see the following:

 
{code:java}
--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD
{code}
before the 
{code:java}
Content-Transfer-Encoding: 7bit {code}
and 
{code:java}
Content-Type: multipart/mixed; {code}
and then for second part of the boundary
{code:java}
Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B{code}
should have two dashes in front of it rather than one. Thus the `correct` MIME 
should look like the following (which actually can be processed by Apache 
Commons library):

 
{code:java}
Message-Id: <[email protected]>
X-Mailer: Apple Mail (2.3256.125.2.9.53)
Resent-Message-Id: <[email protected]>Content-Transfer-
--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD
Content-Type: multipart/mixed; 
boundary="Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B"

--Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset=us-asciiContent-Disposition: inline; 
filename=3529636.pdf
Content-Type: application/pdf; x-mac-hide-extension=yes; x-unix-mode=0644; 
name="3529636.pdf"
Content-Transfer-Encoding: base64
--Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset=us-ascii
--Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B--

--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD--
{code}
 


was (Author: theoand):
I can see what you mean in my last comment, but I can see that it does not 
follow that pattern in the example I gave in the description of this ticket. I 
would have expected to see something like this instead to see the following:

 
{code:java}
--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD
{code}
before the 
{code:java}
Content-Transfer-Encoding: 7bit {code}
and 
{code:java}
Content-Type: multipart/mixed; {code}
and then for second part of the boundary
{code:java}
Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B{code}
should have two dashes in front of it rather than one. Thus the `correct` MIME 
should look like the following (which actually can be processed by Apache 
Commons library):

 
{code:java}
Message-Id: <[email protected]>
X-Mailer: Apple Mail (2.3256.125.2.9.53)
Resent-Message-Id: <[email protected]>Content-Transfer-
--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD
Content-Type: multipart/mixed; 
boundary="Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B"

--Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset=us-asciiContent-Disposition: inline; 
filename=3529636.pdf
Content-Type: application/pdf; x-mac-hide-extension=yes; x-unix-mode=0644; 
name="3529636.pdf"
Content-Transfer-Encoding: base64
-Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset=us-ascii
--Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD--
{code}
 

> MimeMessageParser.parse() throws "Missing start boundary" exception
> -------------------------------------------------------------------
>
>                 Key: EMAIL-199
>                 URL: https://issues.apache.org/jira/browse/EMAIL-199
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.5
>            Reporter: Theodosios Andreou
>            Priority: Major
>
> h4. Description
> I have a MIME header file generated by `ripmime` that should reflect an 
> attachment within its boundaries:
>  
>  
> {noformat}
> Content-Type: multipart/alternative; 
> boundary="Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD"
> Mime-Version: 1.0 (Mac OS X Mail 14.0 (3654.120.0.1.13))
> Date: Fri, 20 Aug 2021 11:32:50 +0000 (UTC)
> Subject: Email Test Scenario 4: With body with one attachment
> Resent-Date: Tue, 5 Oct 2021 22:58:47 +0200
> Resent-From: A A <[email protected]>
> To: A A <[email protected]>
> Resent-To: [email protected]
> Message-Id: <[email protected]>
> X-Mailer: Apple Mail (2.3256.125.2.9.53)
> Resent-Message-Id: 
> <[email protected]>Content-Transfer-
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset=us-ascii
> Content-Type: multipart/mixed; 
> boundary="Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B"
> --Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B
> Content-Transfer-Encoding: 7bit
> Content-Type: text/html; charset=us-asciiContent-Disposition: inline; 
> filename=3529636.pdf
> Content-Type: application/pdf; x-mac-hide-extension=yes; x-unix-mode=0644; 
> name="3529636.pdf"
> Content-Transfer-Encoding: base64
> -Apple-Mail=_673A962B-4761-43C3-A4F0-CE3B065D412B
> Content-Transfer-Encoding: 7bit
> Content-Type: text/html; charset=us-ascii
> --Apple-Mail=_571FC31E-29ED-47D3-99F6-3B28CF3047AD--
> {noformat}
>  
>  
> *Expected behavio**r*: The parser should be able to complete and return back 
> ` 3529636.pdf` when we call `getAttachmentList()` on it.
>  
> *Workaround*: I haven't found one. It seems that the Mime header is corrupted 
> but `ripmime` reports it as valid. 
>  
> *Optimal solution*: Be able to process such Mime headers. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to