use of javax.mail.search.SearchTerm in project jodd by oblac.
the class EmailFilter method text.
/**
* Defines filter on a message body.
* All parts of the message that are of MIME type "text/*" are searched.
*/
public EmailFilter text(String pattern) {
SearchTerm term = new BodyTerm(pattern);
concat(term);
return this;
}
use of javax.mail.search.SearchTerm in project jodd by oblac.
the class EmailFilter method size.
/**
* Defines filter for message size.
*/
public EmailFilter size(Operator comparison, int size) {
SearchTerm term = new SizeTerm(comparison.value, size);
concat(term);
return this;
}
use of javax.mail.search.SearchTerm in project jodd by oblac.
the class EmailFilter method from.
/**
* Defines filter for FROM field.
*/
public EmailFilter from(String fromAddress) {
SearchTerm fromTerm = new FromStringTerm(fromAddress);
concat(fromTerm);
return this;
}
use of javax.mail.search.SearchTerm in project jodd by oblac.
the class EmailFilter method receivedDate.
/**
* Defines filter for received date.
*/
public EmailFilter receivedDate(Operator operator, long milliseconds) {
SearchTerm term = new ReceivedDateTerm(operator.value, new java.util.Date(milliseconds));
concat(term);
return this;
}
use of javax.mail.search.SearchTerm in project jodd by oblac.
the class EmailFilter method bcc.
/**
* Defines filter for BCC field.
*/
public EmailFilter bcc(String bccAddress) {
SearchTerm toTerm = new RecipientStringTerm(Message.RecipientType.BCC, bccAddress);
concat(toTerm);
return this;
}
Aggregations