dcsimg
header informations
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Thomas_Schneider
Posted On:   Friday, October 28, 2011 03:47 AM

Hello, i get differences in the header informations when i compare the header information from an email on my account by 1) opening the mail and watching the header informations directly and 2) fetching the same mail by javamail and reading out the header informations with the following code: function to get the message: Message[] messages = folder.search(new SearchTerm() { public boolean match(Message msg) { try { return !msg.isSet(Flags.Flag.SEEN); } catch(Exception e) { e.printStackTrace(); return false; } } });    More>>

Hello,
i get differences in the header informations when i compare the header information from an email on my account by

1) opening the mail and watching the header informations directly and

2) fetching the same mail by javamail and reading out the header informations with the following code:


function to get the message:

Message[] messages = folder.search(new SearchTerm()

{

public boolean match(Message msg)

{

try

{

return !msg.isSet(Flags.Flag.SEEN);

}

catch(Exception e)

{

e.printStackTrace();

return false;

}

}

});


function to get the header information:

BufferedWriter oBufferedWriter;

try

{

oBufferedWriter = new BufferedWriter(new FileWriter(Path);

Enumeration enumi = message.getAllHeaderLines();

while(enumi.hasMoreElements())

{
oBufferedWriter.write(enumi.nextElement() + "
");

}

oBufferedWriter.close();

} catch(Exception e)

{

return false;

}

return true;



Why is the header different?

   <<Less
About | Sitemap | Contact