Check out the following fragment:

         Properties props = new Properties();
         props.setProperty( "mail.host", "yoursmtpserver.com" );
         try  {
             Session mailSession = Session.getInstance( props, null );
             MimeMessage message = new MimeMessage( mailSession );
             Address to1 = new InternetAddress( "[EMAIL PROTECTED]", 
"Mike" );
             Address to2 = new InternetAddress( 
"[EMAIL PROTECTED]", "Dave"  );
             Address from = new InternetAddress( "[EMAIL PROTECTED]", 
"Renee" );
             String body = "Blah blah blah.";
             message.setFrom( from );
             message.setRecipients( Message.RecipientType.TO, new Address[] 
{ to1, to2 } );
             message.setSubject( "Testing 1 2 3 " );
             message.setContent( body, "text/plain" );
             Transport.send( message );
         }
         catch (UnsupportedEncodingException uee) {
             System.out.println( "Unsupported encoding!" );
         }
         catch (MessagingException me) {
             System.out.println( "Messaging exception!" );
         }


At 11:51 AM 1/30/2002 -0500, you wrote:
>Hello everybody,
>
>Can somebody tell me how can I send more than one copy in the cc field of a
>mail using JavaMail.  Do I have to use some kind of separator?.
>
>Thanks in advance,
>
>Lorena Carló
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff 
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to