krishoneil wrote:
>
> hi.. i'm looking for a mailet that can match word contents, either in
> plain txt or html (not attachment) in emails.
>
Hi, you should create your own mailet/matcher for this purpose!
http://james.apache.org/server/2.3.1/index.html
http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-jamesmail.html?page=1
//this matcher allow all recipients
public class MyMatcher extends GenericRecipientMatcher {
@Override
public boolean matchRecipient(MailAddress recipient) {
return true;
}
}
//mailet
public class MyMailet extends GenericMailet {
@Override
public void service(Mail mail) throws MessagingException {
for (Object obj : mail.getRecipients()) {
MailAddress mailAddress = (MailAddress) obj ;
System.out.println(mail.getMessage().getDescription()) ;
}
}
}
--
View this message in context:
http://www.nabble.com/mailet-to-filter-words-in-mail-tf4139614.html#a12300655
Sent from the James - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]