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

Michael Osipov commented on EMAIL-199:
--------------------------------------

Can you please repaste the original content it has line breaks where not 
necessary as well as missing line breaks. This makes har to judge.

Your second example is invalid. You start a nested multipart message without 
properly terminating it.

> 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