commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quinton McCombs" <quin...@qdog.org>
Subject [EMAIL] RE: commons-sandbox-email question
Date Fri, 21 Mar 2003 21:01:57 GMT
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:qmccombs@NequalsOne.com
http://www.NequalsOne.com 

> -----Original Message-----
> From: Brian Cross [mailto:brian@thebmeist.com] 
> Sent: Friday, March 21, 2003 2:47 PM
> To: quintonm@bellsouth.net
> 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message