private Resource attachmentDirectory = null;
public static MailClient getInstance(int type,String server, int port, String username, String password){
if(TYPE_POP3==type)
return new PopClient(server,port,username,password);
if(TYPE_IMAP==type)
return new ImapClient(server,port,username,password);
return null;
}