Inspired by a session at TEDC16 our team is looking to build dynamic email using HTML uploaded by an API. While we know CM supports dynamic content, we have not been able to get any documentation, or even know if it's possible, to use dynamic content without logging into the CheetahMail system and building it there. Can anyone here help?

For example, is it possible for the html file for the email to include something like this (I'm just making up the syntax for the if statements here since that's the information I'm looking for):

%%IF_state IS NC%%
<img src="nc-logo.jpg">
<img src="generic-logo.jpg">