remove envelope generation to separate module (can be reused for message/rfc822 bodystructure parsing