Package javax.mail.search

Examples of javax.mail.search.SearchTerm


  /**
   * Defines filter for FROM field.
   */
  public EmailFilter from(String fromAddress) {
    SearchTerm fromTerm = new FromStringTerm(fromAddress);
    concat(fromTerm);
    return this;
  }
View Full Code Here


  /**
   * Defines filter for TO field.
   */
  public EmailFilter to(String toAddress) {
    SearchTerm toTerm = new RecipientStringTerm(Message.RecipientType.TO, toAddress);
    concat(toTerm);
    return this;
  }
View Full Code Here

  /**
   * Defines filter for CC field.
   */
  public EmailFilter cc(String ccAddress) {
    SearchTerm toTerm = new RecipientStringTerm(Message.RecipientType.CC, ccAddress);
    concat(toTerm);
    return this;
  }
View Full Code Here

  /**
   * Defines filter for BCC field.
   */
  public EmailFilter bcc(String bccAddress) {
    SearchTerm toTerm = new RecipientStringTerm(Message.RecipientType.BCC, bccAddress);
    concat(toTerm);
    return this;
  }
View Full Code Here

  /**
   * Defines filter for many flags at once.
   */
  public EmailFilter flags(Flags flags, boolean value) {
    SearchTerm flagTerm = new FlagTerm(flags, value);
    concat(flagTerm);
    return this;
  }
View Full Code Here

  /**
   * Appends single filter as NOT.
   */
  public EmailFilter not(EmailFilter emailFilter) {
    SearchTerm searchTerm = new NotTerm(emailFilter.searchTerm);
    concat(searchTerm);
    return this;
  }
View Full Code Here

TOP

Related Classes of javax.mail.search.SearchTerm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.