The tl;dr is, there's no simple API to do that. You would have to:
- obtain the MIME structure of the original message (easy, using MsgHdrToMimeMessage, see http://blog.xulforum.org/index.php?post/2011/03/14/Basic-MimeMessage-demo)
- reserialize it (feasible, I know the tests in Thunderbird do just that, you would probably have to convert a MimeMessage into a SyntheticMessage, and use toMessageString (http://mxr.mozilla.org/comm-central/source/mailnews/test/resources/messageGenerator.js#664), or maybe just write the serialization yourself ; in any case, you'd probably lose a lot of information (whitespace, etc.), as well as possibly attachments (MsgHdrToMimeMessage will drop them if they're too big)),
- replace the old message with the new one (known to be feasible, see my answer on how to do nsIMsgDBHdr permanent change commits)
What exactly are you trying to achieve?