One of my key projects whilst freelancing for M+S in 2014 was a new type of email called a 'scorecard', which relied on complex algorithms to serve up different content for each customer; depending on their preferences. I created a mobile first template which could hold the three pieces of bespoke content per email.
Above: The entirely code-based scorecard emails. Below: Various offer based marketing email designs