Perhaps you could setup this system in a different way. I don't know what the content of your mail is but if they are basically just default texts with some names and data filled in, you could make some HTML templates with tokens and replace the tokens with the real data later. Or add the 'dear <name>' text as a default in your HTML editor, then people can choose if they want to leave it in.
There is no easy solution otherwise, parsing the content of the HTML and inserting additional text would be much more complex. It's doable though if you really must.