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("[EMAIL PROTECTED],Maria");   
                
                email.setFrom("[EMAIL PROTECTED]", "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("[EMAIL PROTECTED]");
                email.setDebug(true);
                email.setHostName("test.myhost.com");
      ---->>>>  email.setTo(c);
                email.setFrom("[EMAIL PROTECTED]", "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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to