Subject: {{ mail.subject }} From: {{ mail.from_address }} To: {{ mail.to }} When: {{ mail.when }} {% if content_type == 'text/html' %} {% autoescape off %} {{ content }} {% endautoescape %} {% else %} {{ content }} {% endif %}