public Mail handle_mail(final String input, final Client client) {
		// TODO resolve the issue of where to send the new mail object since I
		// can't return it because this is a handler
		final int START = 0;
		final int SUBJECT = 1;
		final int RECIPIENT = 2;
		final int MESSAGE = 3;
		final int DONE = 4;

		final Player player = getPlayer(client);

		final EditorData data = player.getEditorData();

		final int step = (Integer) data.getObject("step");

		System.out.println("MAIL: " + step);

		// done
		if (input.equals(".")) { // send the mail
			final String sender = (String) data.getObject("sender");
			final String recipient = (String) data.getObject("recipient");
			final String subject = (String) data.getObject("subject");
			final String message = (String) data.getObject("message");
			
			final Mail mail = new Mail(-1, sender, recipient, subject, message, getDate().toString(), Mail.UNREAD);

			// exit
			send("< Exiting... >", client);

			// reset editor and player status
			player.setStatus((String) data.getObject("pstatus"));
			player.setEditor(Editors.NONE);

			sendMail(mail, player);

			return mail;
		}
		else if (input.equals("~")) { // abort sending
			// exit
			send("< Exiting... >", client);

			// reset editor and player status
			player.setStatus((String) data.getObject("pstatus"));
			player.setEditor(Editors.NONE);

			return null;
		}
		else {
			switch (step) {
			case START:
				client.writeln("Writing a new mail message...");
				data.setObject("step", SUBJECT);
				send("Subject?", client);
				break;
			case SUBJECT:
				data.setObject("subject", input);
				echo(input, true, client);
				data.setObject("step", RECIPIENT);
				send("Recipient?", client);
				break;
			case RECIPIENT:
				data.setObject("recipient", input);
				echo(input, true, client);
				data.setObject("step", MESSAGE);
				send("Message:", client);
				break;
			case MESSAGE:
				data.setObject("message", input);
				echo(input, true, client);
				data.setObject("step", DONE);
				send("Done.", client);
				break;
			case DONE:
				break;
			default:
				break;
			}
		}

		return null;
	}