private void attendClient(ClientProcessor cp) {
    	DataProvider dataProvider = new DataProvider();
    	IncomingEmail email = new IncomingEmail();
    	while(cp.hasMessages()) {
			String message = cp.getMessage();
			System.out.println("Mensaje Recibido: " + message);
			switch (getExpression(message)) {
				case "LOGIN":
					cp.send(dataProvider.login(message));
					break;
					
				case "CLIST": 
					cp.sendContacts(dataProvider.getContacts());
					break;
					
				case "GETNEWMAILS": 
					cp.sendMails(dataProvider.getEmails());
					break;
					
				case "NEWCONT":
					cp.send(dataProvider.checkContact(message));
					break;
				
				case "SEND MAIL":
					email = new IncomingEmail();
					break;
					
				case "MAIL TO":
					email.addRecipient(message.split(" ")[2]);
					break;
					
				case "MAIL SUBJECT":
					Matcher subjectMatcher = Pattern.compile("^MAIL SUBJECT \"(.*)\"").matcher(message);
					subjectMatcher.find();
					email.setSubject(subjectMatcher.group(1));
					break;
					
				case "MAIL BODY":
					Matcher bodyMatcher = Pattern.compile("^MAIL BODY \"(.*)\"").matcher(message);
					bodyMatcher.find();
					email.setSubject(bodyMatcher.group(1));
					break;
					
				case "END SEND MAIL":
					cp.send(dataProvider.sendMail(email));
					break;
					
				default:
					cp.send("INVALID COMMAND ERROR");
					break;
			}
		}
    }