Changed console and filebackend to use msg.as_bytes to output the data as it would get send via smtp.