By "email id", you mean the email address? If so, the objective is to connect to a mail server and retrieve all messages from a particular address? If so, then that's what the JavaMail API is for; see the
JavaEnterpriseEditionFaq for much information about it. If you meant something else, please describe what that is in more detail.