Thanks Burke,
After checking the code of the example I figured it out, the problem was I was missing the Protocol setting.
var vCOMail = new MailClient();
System.log("Start");
vCOMail.setProtocol("pop3");
vCOMail.connect(emailServer,defaultPort,loginName,password);
System.log("login");