classpathx-javamail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-javamail] Parsing a MimeMultipart :: Test case


From: remi__
Subject: Re: [Classpathx-javamail] Parsing a MimeMultipart :: Test case
Date: Fri, 18 May 2007 03:11:11 -0700 (PDT)

As you suggested, here is the answer of themail server I use. 

* 23 FETCH (BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "windows-1252") NIL
NIL "7bit" 9 1)("TEXT" "PLAIN" ("NAME" "file") NIL NIL "base64" 2516 33 NIL
("attachment" ("FILENAME" "file")))("TEXT" "PLAIN" ("NAME" "file") NIL NIL
"base64" 2516 33 NIL ("attachment" ("FILENAME" "file")))("TEXT" "PLAIN"
("NAME" "file") NIL NIL "base64" 2516 33 NIL ("attachment" ("FILENAME"
"file")))("TEXT" "PLAIN" ("NAME" "file") NIL NIL "base64" 2516 33 NIL
("attachment" ("FILENAME" "file")))("TEXT" "PLAIN" ("NAME" "file") NIL NIL
"base64" 2516 33 NIL ("attachment" ("FILENAME" "file"))) "MIXED" ("BOUNDARY"
"----=_Part_0_31379709.1179480493454") NIL NIL))

And here is the output of my test case:

Content-Type: text/plain; name=file
Content-Transfer-Encoding: 33
javax.mail.MessagingException: Unknown encoding: 33
        at javax.mail.internet.MimeUtility.encode(MimeUtility.java:240)
        at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:804)
        at TestGNUMail.displayMail(TestGNUMail.java:61)
        at TestGNUMail.test(TestGNUMail.java:45)
        at TestGNUMail.main(TestGNUMail.java:33)
Content-Id: base64
Content-Description: 2516
 
It seems that the "2516 33" pattern is recurrent in the answer. Is that
supposed to be so? I have no knowledge in the IMAP protocol.

I am going to insvestigate in the direction to the server.

Rémi


Chris Burdess-2 wrote:
> 
> remi__ wrote:
>> Here is a test case.
>> I added the client.jar file from JOnAS 4.8.4 lib to the classpath  
>> to compile
>> and run. This jar contains a javamail implementation based on GNU- 
>> javamail
>> 1.1.1
>>
>> The test case sends a mail to an IMAP server with a few xml  
>> enclosed files
>> (you have to specify the file in the code). It retrieves the mail and
>> displays one of the body parts.
>>
>> The output is done on System.out and the result displays the  
>> "bug" ( if it
>> is a bug ...)
>>
>> Thanks
>>
>> Rémi
>>
>> http://www.nabble.com/file/8463/TestGNUMail.java TestGNUMail.java
> 
> Thanks for this.
> 
> I just tried out your test here, this is the result (tested against  
> an Exchange server):
> 
> Content-Type: application/octet-stream; name=file.xml
> Content-Transfer-Encoding: 7BIT
> Content-Disposition: attachment; filename=file.xml
> 
> <test/>
> 
> So this leads me to suspect something weird in the specific server  
> you're using. Perhaps you could capture the TCP session using a tool  
> like tcpflow for the duration of your program?
> 
> _______________________________________________
> Classpathx-javamail mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpathx-javamail
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Parsing-a-MimeMultipart-tf3765039.html#a10679455
Sent from the classpathx-javamail mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]