Sending HTML emails with T-SQL using XML

On SQL Zaterdag, André pointed out a way to concatenate data from a result set with XML (see for example Anith Sen's blog about this). And that trick can also be used to make clean formatted HTML table.