I have been considering this... I have been thinking about a new class perhaps called BulkSend(Collection). This would take a collection of messages and send them in the manner described below. Haven't really had time to try it out yet though.
-------------------------------------------- Quinton McCombs NequalsOne - HealthCare marketing tools mailto:[EMAIL PROTECTED] http://www.NequalsOne.com > -----Original Message----- > From: Brian Cross [mailto:[EMAIL PROTECTED] > Sent: Friday, March 21, 2003 2:47 PM > To: [EMAIL PROTECTED] > Subject: commons-sandbox-email question > > > Hey Quinton, > > I was wondering if there were any plans to add support for > the following to > commons-email. Great work on the package. Thanks a lot. > > Excerpt from the JavaMail FAQ: > > Q: I want to repeatedly send messages, to a different set of > recipients each > time. But invoking Transport.send(Message) causes a new > Transport session to > be established each time. This is suboptimal in this case, so > how do I get > around this? > A: Create an instance of the appropriate Transport object, > connect to it and > invoke the sendMessage() method repeatedly. For example: > > MimeMessage msg = ...; > // construct message > msg.saveChanges(); > Transport t = session.getTransport("smtp"); > t.connect(); > > for (int i = 0; .....) { > t.sendMessage(msg, new Address[] { recipients[i] }); > } > t.close(); > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
