SyntaxFix
Write A Post
Hire A Developer
Questions
you have to call
msg.saveChanges();
after setting content type.