1 17 18 package org.apache.james.transport.mailets; 19 20 import org.apache.james.transport.matchers.HasHabeasWarrantMark; 21 import org.apache.mailet.GenericMailet ; 22 import org.apache.mailet.Mail ; 23 24 72 73 public class AddHabeasWarrantMark extends GenericMailet 74 { 75 87 public void service(Mail mail) throws javax.mail.MessagingException 88 { 89 try 90 { 91 javax.mail.internet.MimeMessage message = mail.getMessage(); 92 93 for(int i = 0 ; i < HasHabeasWarrantMark.warrantMark.length ; i++) 94 { 95 message.setHeader(HasHabeasWarrantMark.warrantMark[i][0], HasHabeasWarrantMark.warrantMark[i][1]); 96 } 97 98 message.saveChanges(); 99 } 100 catch (javax.mail.MessagingException me) 101 { 102 log(me.getMessage()); 103 } 104 } 105 106 111 public String getMailetInfo() 112 { 113 return "Add Habeas Warrant Mark. Must be used in accordance with a license from Habeas (see http://www.habeas.com for details)."; 114 } 115 } 116 | Popular Tags |