The code is working for me, please try it:
msg.addMessage({ contentType: 'text/html', data: `This is an <b>auto-reply</b>` // changed " to ` });
I simply changed " to ` and the code is working fine.