Added outgoing queue support
Added xml formatting
Fixed bug: messages bodies can only be read once