On 28 Sep 2005 23:18:15 GMT, "Leon" <> wrote or
quoted :
> So it seems that my mail client dont really get these
>messages from the isp server and instead just reads them. What do i do wrong?
You have to delete them after you have read them. I have found this
process to be unreliable. I never did nail down why.
You need some code something like this. I hope somebody can see a bug
in this:
/**
* Shutdown receive session.
*/
static void close()
{
try
{
if ( rm != null )
{
// shaw won't let us mark deleted.
/* mark the original message as deleted, whether we
successfully processed it or not. */
rm.setFlag( Flags.Flag.SEEN, true );
rm.setFlag( Flags.Flag.DELETED, true );
}
if ( folder != null )
{
folder.close( true ); // please delete messages marked
deleted.
}
if ( store != null )
{
store.close();
}
/* no such thing as session.close(); */
}
catch ( Exception e )
{
log.println( e.getMessage() );
e.printStackTrace();
reason = "Trouble shutting down";
}
}
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.