public Stack<IncomingEmail> getEmails() {
    	try {
			connection.connect();
			connection.executeQuery(USER_MAILS + connectedUser.getID());
			Stack<IncomingEmail> emails = new Stack<IncomingEmail>();

			while (connection.next()) {
				IncomingEmail email = new IncomingEmail((String) connection.getString("subject"),
						(String) connection.getString("body"),
						(String) connection.getString("from_username"),
						connectedUser.getID());
				emails.push(email);
			}
			connection.close();
			return emails;
		} catch (Exception e) {
			System.out.println("Ocurrio un error al tratar de conectarse.");
		}
    	return null;
    }