Working on writeMime function (may make this a full encoder later)