You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Sharma, Ashish" <as...@hp.com> on 2011/10/19 18:26:12 UTC
Unable to pull out file names of attached file
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.
Thanks
Ashish
Re: Unable to pull out file names of attached file
Posted by Markus Wiederkehr <ma...@gmail.com>.
This feature is not yet implemented, we have an open ticket for it:
https://issues.apache.org/jira/browse/MIME4J-109
Markus
On Fri, Oct 21, 2011 at 9:56 AM, Sharma, Ashish <as...@hp.com>wrote:
> 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:apache@bago.org]
> Sent: Wednesday, October 19, 2011 10:00 PM
> To: mime4j-dev@james.apache.org
> Subject: Re: Unable to pull out file names of attached file
>
> 2011/10/19 Sharma, Ashish <as...@hp.com>:
> > 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
>
RE: Unable to pull out file names of attached file
Posted by "Sharma, Ashish" <as...@hp.com>.
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:apache@bago.org]
Sent: Wednesday, October 19, 2011 10:00 PM
To: mime4j-dev@james.apache.org
Subject: Re: Unable to pull out file names of attached file
2011/10/19 Sharma, Ashish <as...@hp.com>:
> 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
Re: Unable to pull out file names of attached file
Posted by Stefano Bagnara <ap...@bago.org>.
2011/10/19 Sharma, Ashish <as...@hp.com>:
> 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