SimpleMail

SimpleMail is a GUI-less addon to automatically grab things from
the mail.  No sending, yet.  It's meant to simplify life for bank alts.

SimpleMail has two main commands:  "get" and "check".  Check lists items,
while get attempts to acquire them.  Both are aimed at auction house messages
or sent mail; they don't delete letters with actual content, for instance.
(In fact, SimpleMail never tries to delete a message; any deletions are
the game's automatic deletion of empty items.)

Both items take a number of flags.  Flags are specified as letters
following a hyphen.  For instance, "/sm get -w" attempts to get every
item in the mailbox that's an auction you've won.

Flags are:
  -a -> only "Auction House" messages
  -A -> everything BUT "Auction House" messages
  -c -> print only totals
  -C -> look at COD messages (accept CODs, or scan their amounts)
  -e -> only "Auction expired" messages
  -f -> look at sender only, not subject
  -j -> look at subject only, not sender
  -w -> only "Auction won" messages
  -o -> only "Outbid on" messages
  -s -> only "Auction successful" messages

If SimpleMail seems to have hung, it probably just needs to be kicked;
try "/sm kick" to nudge it into resuming.  "/sm reset" will reset it
so you can try again.  Unfortunately, Blizzard's mailbox event API is
sorta crappy (you can't just be notified when a previous request is
completely processed; you get a variable number of events depending
on what you asked for, whether the mail was already read, and so on),
so sometimes that happens.  It works most of the time!

Usage:
	/sm get
		Get everything.

	/sm get 5
		Get five items.

	/sm get 5 Auction Expired
		Get five items with "Auction Expired" in the subject
		line or sender.

	/sm get -e 5
		Get five Auction House "Auction expired" messages.

	/sm get 5+5
		Get five items, but skip the first 5 items in the mailbox.

	/sm check Bob
		List all items which were sent by Bob (including a total
		of any money sent).

	/sm check -cf Bob
		Report how many items were sent by Bob, and the total of
		any money sent, but don't list individual items.

	/sm check -fc Mathonwy
		Report total number of messages in Mailbox sent by
		Mathonwy.

	/sm get -o
		Collect any money returned for auctions where you were
		outbid.

	/sm get -e 40
		Get 40 items that were returned to you when their
		auctions expired.

	/sm check -sc
		Report how much money is in your mailbox from successful
		auctions.

	/sm check -A
		List sender and subject (plus money, if any) of every
		message that wasn't from an auction house.
