1 17 18 package org.apache.james.transport.mailets.debug; 19 20 import org.apache.mailet.GenericMailet; 21 import org.apache.mailet.Mail; 22 23 import javax.mail.MessagingException ; 24 import javax.mail.internet.MimeMessage ; 25 import java.io.IOException ; 26 27 31 public class DumpSystemErr extends GenericMailet { 32 33 40 public void service(Mail mail) throws MessagingException { 41 try { 42 MimeMessage message = mail.getMessage(); 43 message.writeTo(System.err); 44 } catch (IOException ioe) { 45 log("error printing message", ioe); 46 } 47 } 48 49 54 public String getMailetInfo() { 55 return "Dumps message to System.err"; 56 } 57 } 58 | Popular Tags |