I am trying to design a Java Batch program which will monitor a particular mailbox in MS outlook , and if a new mail is received it should process the mail
and fetch the attachment which is an excel sheet and process the content of the excel sheet and load it to MSSQL database.
I know how to process Excel using java but confused on which design or API I need to use for monitoring mailbox.
Could you please share some high level idea on this... Thanks !!!
The API for handling mail is called JavaMail. I suggest to start with familiarizing yourself with that: how to access mail, how to retrieve new mail, how to determine which messages have attachments etc. Only then add handling of attachments (how that's done has nothing to do with mail processing as such).
I have googled about Java mail API and used below sample code to connect to my outlook mailbox but it is showing connection failed.
Dont know whether im passing the parameters wrongly. Im sure that my username and password is correct.
Now Im able to connect to the host but its throwing certificate chaining error.
When I googled about this error, suggestions was like i need to import certificates to my WAS server.
But this is standalone application which i have not published to any server. So don't know how to proceed.