message-replace-header

message-replace-header is a compiled Lisp function in `message.el'.

(message-replace-header HEADER NEW-VALUE &optional AFTER FORCE)

Remove HEADER and insert the NEW-VALUE.
If AFTER, insert after this header. If FORCE, insert new field
even if NEW-VALUE is empty.