title: Access Sent Messages, Spam folders through IMAP
body: <p>I am trying to read emails present in folders of Gmail. For reading inbox mails i tried:</p>
  
  <pre><code>    Properties properties = new Properties();
      properties.setProperty("mail.host", "imap.gmail.com");
      properties.setProperty("mail.port", "995");
      properties.setProperty("mail.transport.protocol", "imaps");
      store = session.getStore("imaps");
      store.connect();
      folder = store.getFolder("INBOX");
      folder.open(Folder.READ_ONLY);
  </code></pre>
  
  <p>but for reading SPAM or Sent, I should replace INBOX with which keyword?</p>