Stefano,

I have logged a relevant Bug as per your suggestion.

Meanwhile can someone give me any alternative approach that I can use till the 
Bug is fixed in the next build?

As of now I get a Map of following type (by using the call 
((MaximalBodyDescriptor)bodyDescriptor).getContentDispositionParameters()):

Key: filename*3*, Value: 
%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8.txt

Key: filename*1*, Value: 
%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD

Key: filename*0*, Value: 
utf-8''%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8

Key: filename*2*, Value: 
%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8

For the content disposition string :

Content-Disposition: attachment;
        
filename*0*=utf-8''%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8;
        
filename*1*=%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD;
        
filename*2*=%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8;
        filename*3*=%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8%E5%A5%BD%E6%82%A8.txt

Here an ordered list would have been a good option in recreating and decoding 
the original filename.

Any suggestions anyone?

Thanks
Ashish

-----Original Message-----
From: Stefano Bagnara [mailto:[email protected]] 
Sent: Wednesday, October 19, 2011 10:00 PM
To: [email protected]
Subject: Re: Unable to pull out file names of attached file

2011/10/19 Sharma, Ashish <[email protected]>:
> Hi,
>
> I am using mime4j (version 0.7) for parsing emails.
>
> I am unable to get the file name of an attachment in an email that is sent to 
> me by using an iPhone.
>
> To me it looks like mime4j is unable to identify the filename of the 
> attachment that is added in the email. (Refer RFC : 2183, 2184, 2231)
>
> Can someone look into the issue?
>
> Email is attached.

Email attachments are stripped by the mailing list manager.
Can you open a JIRA issue and attach your email there?
http://issues.apache.org/jira/browse/MIME4J

Stefano

Reply via email to