cleaned up Mail plugin code

refactored mail, rcv, inbox to reflect changes to Core.Type