set content encoding and unique message id