Posted By:
notim_porta
Posted On:
Wednesday, August 27, 2003 07:50 AM
Hi all, I need to send several different emails, say 50, and in order to be reuse resources I use the same Transport object, and call the sendMessage() method for each email. Finally I close the connection Transport.close() . Because it's possible for my program to be inactive for hours, before calling transport.sendMessage() I must be sure that the connection is still alive, so I use the method Transport.isConnected() . My susrprise was big when I discovered that afetr sending 15 or 20 emails quickly, the call to the method isConnected() could take up to 5 minutes, I discovered it using the debug option. I also have checked that if I
More>>
Hi all,
I need to send several different emails, say 50, and in order to be reuse resources I use the same
Transport
object, and call the
sendMessage()
method for each email. Finally I close the connection
Transport.close()
.
Because it's possible for my program to be inactive for hours, before calling
transport.sendMessage()
I must be sure that the connection is still alive, so I use the method
Transport.isConnected()
.
My susrprise was big when I discovered that afetr sending 15 or 20 emails quickly, the call to the method
isConnected()
could take up to 5 minutes, I discovered it using the debug option.
I also have checked that if I use a diferent connection for each mail the problem is gone, but I'd like to use te other method that should be faster, if everything worked fine.
thanks
<<Less