Hi Guys,
I am curious If there is a way to change the SMTPAppender to accept multiple "To" 
email address, which is the default way it works. Does anyone has implemented this?
The method activateOptions seems to set the information for sending..Should I be 
extending this class and overwrite this method, to accept mutiple email address.?
Thanks
 
 public void activateOptions()
    {
        Properties properties = new Properties(System.getProperties());
        if(smtpHost != null)
            properties.put("mail.smtp.host", smtpHost);
        Session session = Session.getInstance(properties, null);
        msg = new MimeMessage(session);
        try
        {
            if(from != null)
                msg.setFrom(getAddress(from));
            else
                msg.setFrom();
            msg.setRecipients(javax.mail.Message.RecipientType.TO, parseAddress(to));
            if(subject != null)
                msg.setSubject(subject);
        }
        catch(MessagingException messagingexception)
        {
            LogLog.error("Could not activate SMTPAppender options.", 
messagingexception);
        }
    }
 

                
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

Reply via email to