Exactly as you said, you have to pre encode in the html 100%, for example gmail will NEVER allow you to call an external resource. I have no idea about the other, but I will not be surprised if they perform a similar approach.
Also 100% forget about about css styling, place the text in the banner and render the final ad as a single image to be embedded.