In this post under Java Mail, I will explain with example how to search mails in an inbox. To start a search we need to establish criterias and only those mails matching the criterias will be displayed. To establish criteria we will take the help of javax.mail.search.SearchTerm abstract class. Even though SearchTerm is an abstract…… Continue reading Searching Mails
Month: March 2021
Receiving Email using POP3 protocol
In this post under Java Mail, I will explain with example how to receive email using POP3 protocal. The steps involved are 1) Setup the properties object2) Create a Session object3) Get a Store instance using Session’s getStore method4) Connect to the store using email address and application password5) Get the inbox folder from the…… Continue reading Receiving Email using POP3 protocol