You should call saveChanges() after you create a new message or modify an existing message. This will cause the headers to be reset and reflect your changes. Note that the Transport.send(Message) method calls this implicitly. So if all you are doing is sending the modified message, you can skip calling saveChanges() yourself. saveChanges() is a potentially expensive operation (especially for large or deeply nested messages), so call it only when needed.
You should call saveChanges() after you create a new message or modify an existing message. This will cause the headers to be reset and reflect your changes. Note that the Transport.send(Message) method calls this implicitly. So if all you are doing is sending the modified message, you can skip calling saveChanges() yourself. saveChanges() is a potentially expensive operation (especially for large or deeply nested messages), so call it only when needed.