Am trying to read mails from our mail server using Javamail api. The program works fine when am running it on eclipse in windows on my local system. When i move the same code to our linux environment it gets connection timed out error.
Do i need to install some package on linux or anything? I believe the port should be open else i wont be able to connect from my local network?
The code am using is as below:
properties.setProperty("mail.store.protocol", "imaps");
properties.put("mail.imaps.ssl.trust", "*");
session = Session.getInstance(properties, null);
store = session.getStore();
store.connect(mailServerName, userName, password);