Re-add reading from mail behavior and add debugmsg