title: How to set the email protocol in JavaMail
body: <p>If I need to get inbox messages by passing request from servlets to javamail API , how can I know the protocol in which to retrieve inbox messages? Do I have to state the protocol in request URL? </p>
  
  <p>I've already checked in gmail, where they haven't stated any protocol, then How can I get inbox messages based on particular protocol like: POP3 or IMAP </p>