Hi Rob,
Thanks for reply,
Actuly I want to read the mail from my webmail(official mail).
to get from gmail we use below code.
Properties props = new Properties();
props.setProperty("mail.store.protocol", "imaps");
Session session = Session.getInstance(props, null);
Store store = session.getStore();
store.connect("imap.gmail.com", "@gmail.com", "e*****");
Folder inbox = store.getFolder("INBOX");
inbox.open(Folder.READ_ONLY);
Message msg = inbox.getMessage(inbox.getMessageCount());
but if i want to connect my webmail ,wht are the changes I need to update in the below line of code.
store.connect("imap.gmail.com", "@gmail.com", "e*****");
URL :-
https://webmail.companyname.com.my/owa/
username :- test
password:-test123
my objective is to read mail from my webmail account