title: Equivalent java code for IMAP command
body: <p>We are using Godaddy email server. We are trying fetch emails using IMAP protocol . Following are my sample IMAP commands</p>
  
  <pre><code>a select inbox
  a UID SEARCH FROM "user1@server.com"
  </code></pre>
  
  <p>Results are getting fine for above commands something like below</p>
  
  <pre><code> * SEARCH 501 505 342 229 191
  a OK SEARCH done.
  </code></pre>
  
  <p>If I write equivalent Java code for above commands , I'm getting empty results. Following is Java code.</p>
  
  <pre><code>IMAPFolder inbox = store.getFolder("INBOX");
  SearchTerm fromTerm = new FromTerm(new InternetAddress("user1@server.com"));
  Message[] messages = inbox.search(fromTerm);
  </code></pre>
  
  <p>The generated IMAP command for above Java code is </p>
  
  <pre><code>a SEARCH FROM user1@server.com ALL
  </code></pre>
  
  <p>but UID is missing in above java generated command so I'm getting empty results . How to include UID while using with Java</p>
  
  <p>Thanks</p>