Friday, 7 November 2008

Organism project update

I found the solution to my connection problem! One little change to my code ( Literally adding an s on the end of Pop3) has allowed me to connect to the mail server and testing has found the spam in my dummy emails!

from

try
{
Properties props = System.getProperties();
Session session = Session.getDefaultInstance(props, null);

store = session.getStore("pop3");

store.connect(popServer, popUser, popPassword);
folder = store.getDefaultFolder();

to

try
{
Properties props = System.getProperties();

Session session = Session.getDefaultInstance(prop
s, null);
store = session.getStore("pop3s");
store.connect(popServer, popUser, popPassword);

folder = store.getDefaultFolder();





I am so happy :) this has been bugging me for days.

No comments: