dcsimg
Extreme slow down sending emails with the Transport.sendMessage() method
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

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

Re: Extreme slow down sending emails with the Transport.sendMessage() method

Posted By:   Benoit_Quintin  
Posted On:   Wednesday, August 27, 2003 10:23 AM

That's quite bizarre,as the isConnected() method in the superclass only returns a boolean value. I assume you use Sun's JDK1.4, with the standard javax.mail package ?
About | Sitemap | Contact