1 17 18 package org.apache.james.transport.mailets.listservcommands; 19 20 import org.apache.mailet.Mail; 21 import org.apache.mailet.MailAddress; 22 import org.apache.avalon.framework.configuration.ConfigurationException; 23 import org.apache.avalon.framework.configuration.Configuration; 24 import org.apache.james.transport.mailets.ICommandListservManager; 25 26 import javax.mail.MessagingException ; 27 import javax.mail.internet.ParseException ; 28 import java.util.List ; 29 import java.util.ArrayList ; 30 31 37 public class Owner extends BaseCommand { 38 39 protected List m_listOwner = new ArrayList (); 40 41 46 public void init(ICommandListservManager commandListservManager, Configuration configuration) throws ConfigurationException { 47 super.init(commandListservManager, configuration); 48 try { 49 m_listOwner.add(new MailAddress(getCommandListservManager().getListOwner())); 50 } catch (ParseException e) { 51 throw new ConfigurationException(e.getMessage(), e); 52 } 53 } 54 55 60 public void onCommand(Mail mail) throws MessagingException { 61 getMailetContext().sendMail(mail.getSender(), m_listOwner, mail.getMessage()); 62 } 63 } 64 | Popular Tags |