List of usage examples for javax.mail.search FromStringTerm FromStringTerm
public FromStringTerm(String pattern)
From source file:org.pentaho.di.job.entries.getpop.MailConnection.java
/** * Set filter on message sender./*from w w w . ja v a 2 s . c o m*/ * * @param sender * messages will be filtered on sender * @param notTerm * negate condition */ public void setSenderTerm(String sender, boolean notTerm) { if (!Utils.isEmpty(sender)) { if (notTerm) { addSearchTerm(new NotTerm(new FromStringTerm(sender))); } else { addSearchTerm(new FromStringTerm(sender)); } } }