commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rose maria <jinima...@yahoo.com>
Subject Urgent:::commons-email
Date Tue, 17 Aug 2004 21:27:31 GMT
Hi,
I was able to send a mail by using SimpleEmail class 
of commons-email when i used the following code
 
		SimpleEmail email = new SimpleEmail();
		email.setDebug(true);
		email.setHostName("test.myhost.com");
		
      ---->>>>
email.addTo("jinimaria@yahoo.com,Maria");   
		
		email.setFrom("me@mycompany.com", "Me");
		email.setMsg("This is a simple test For mail");
		email.send();

but it is not working when i tried to use with a
Collection that is  i replaced "addTo" with "setTo".It
is not
giving any error.Code is as folloing

	  	Collection c = new ArrayList(); 
	  	c.add("jinimaria@yahoo.com");
		email.setDebug(true);
		email.setHostName("test.myhost.com");
      ---->>>>	email.setTo(c);
		email.setFrom("me@mycompany.com", "Me");
		email.setMsg("This is a simple test For
collection");
		email.send();
   Am i missing somthing here.Itried both with
commons-email-0.1-dev.jar and
commons-email-SNAPSHOT.jar
   
   Please include a code snippet if you have any...
      
   Your help would be greatly appreciated.
   
   Thanks
   Maria
		

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message