You can use any scripting language you want pre-send, but the email itself needs to be pure html. The only way you can change its contents after send, is if you link it to a hosted image, and you swap out that image.
With that being said, if you are after a html email example with a chart to get started, take a look here. It is a fluid template which is the most widely supported technique for mobile, web and desktop browsers.