'Render the message template.'

def render_template(self, email_message):

    variables = {ATTR_FROM: EmailContentSensor.get_msg_sender(email_message), ATTR_SUBJECT: EmailContentSensor.get_msg_subject(email_message), ATTR_DATE: email_message['Date'], ATTR_BODY: EmailContentSensor.get_msg_text(email_message)}
    return self._value_template.render(variables)
