title: Java - New mail on inbox
body: <p>I'm creating a simple email robot (using Gmail) 
  and I'd like to know the best approach to set a trigger that parses the message every time a new e-mail hits the inbox.</p>
  
  <p>Basically, my question is -- how I can set the trigger, instead of polling for new emails.</p>