dcsimg
A "1" is inserted before the extension of the attached file when saved it from an email.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sarah_Hui
Posted On:   Tuesday, October 23, 2001 07:13 AM

I tested the example from the send attachment section of the JGuru short
course. I attached a text file which exists in the same directory of the
compiled code, then it works fine. However, if I attached a text file from
other directory (say /temp/data/test.txt), when I want to save the attached
file from the email, it inserts a "1" before the file extension. That is
test1.txt.

Also, I tested other examples, which also have the same problem. I am not sure
if this is the JavaMail bug. Would you please take a look?

Re: A "1" is inserted before the extension of the attached file when saved it from an email.

Posted By:   John_Zukowski  
Posted On:   Tuesday, October 23, 2001 08:03 AM

The setFileName() method of Part isn't expecting directory names. If you are passing in a file from a different directory, you should add code to trim the directory part out and only include the filename piece.
About | Sitemap | Contact