@Command(command = "readmail",
			arguments = {"mail ID"},
			description = "reads the mail message with the given ID",
			permissions = {"read"},
			playerOnly = true)
	public static boolean readMail(CommandSender sender, int mailID) throws EssentialsCommandException {
		// get our mail
		ArrayList<HashMap<String, Object>> results = DatabaseManager.accessQuery(
				"select * from mail where recipient=? and id=?;",
				sender.getName(), mailID);
		
		// make sure we got something
		if(results.size() == 0) {
			throw new EssentialsCommandException("'%d' isn't a valid mail ID (or does not belong to you!", mailID);
		}
		
		// ok, read it
		String mailSender = (String)results.get(0).get("sender");
		String subject = (String)results.get(0).get("subject");
		String contents = ColourHandler.processColours((String)results.get(0).get("contents"));
		Timestamp date = (Timestamp)results.get(0).get("date");
		ColourHandler.sendMessage(sender, "&9Mail from %s: %s (on %s):", mailSender, subject, date.toString());
		String[] lines = ChatPaginator.wordWrap(contents, ChatPaginator.AVERAGE_CHAT_PAGE_WIDTH);
		for(String line: lines) {
			ColourHandler.sendMessage(sender, line);
		}
		
		// now mark it as read
		int updateResults = DatabaseManager.updateQuery(
				"update mail set unread=? where id=?;",
				false, (Integer)results.get(0).get("id"));
		
		// make sure it worked!
		if(updateResults == 0) {
			throw new EssentialsCommandException("Failed to mark the message as read!");
		}
		
		return true;
	}