dcsimg
Lotus Notes Corrupts attachments if they are read with javamail.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sigtryggur_Sigtryggsson
Posted On:   Wednesday, December 5, 2001 02:46 PM

Hi All I am monitoring a specific folder, reading emails and reading the attachments as an InputStream. This all seems to work fine but after reading the email, the attachment seems to have been duplicated in the email but when I try to open the duplicated attachment I get an "Invalid or nonexistend document" error from Lotus Notes, If I try to open the original attachment it opens ok. If I try parsing the same email again with javamail, javamail indicates that there is only 1 attachment* and is not able to parse the attachment. (*in the first run the count was 2 attachments) Even if I open the folder as read only the message gets corrupted. I ha   More>>

Hi All


I am monitoring a specific folder, reading emails and reading the attachments as an InputStream.


This all seems to work fine but after reading the email, the attachment seems to have been duplicated in the email but when I try to open the duplicated attachment I get an "Invalid or nonexistend document" error from Lotus Notes, If I try to open the original attachment it opens ok.


If I try parsing the same email again with javamail, javamail indicates that there is only 1 attachment* and is not able to parse the attachment. (*in the first run the count was 2 attachments)


Even if I open the folder as read only the message gets corrupted.


I have tried to get around this problem by copying the email to another folder before reading the original email and after parsing the attachments I delete the original file and still have a copy of it in the other folder.


Unfortunately this does not work since Lotus Notes treats both the emails as the same one and corrupts the copy as well as the original email.



in the javamail documentation it is mentioned that if the email is getting corrupted then you might correct that by setting mail.imap.partialfetch to false, I think I have done that correctly but I am not sure, I include the code I use below, could you please comment on what is the right method.


Properties props = System.getProperties();

props.put("mail.imap.partialfetch", "false");

System.setProperty("mail.imap.partialfetch","false");

Session session = Session.getDefaultInstance(props, null);

store = session.getStore(protocol);// Get a Store object

store.connect(host, port, user, password);




Does anyone have an idea of how to correct this or workaround this ?





Ps.
The Lotus Notes Release is 5.0.8 June 18 2001

Javamail is version 1.2

The protocol is imap

   <<Less
About | Sitemap | Contact