def get_email_subject(content):
    """
    Return the subject of the HTML email taken from the title of the HTML
    template.


    :return: the subject of the HTML email template.


    :raise AssertError: If the content of the HTML email template has not
        been read, of if this HTML has no title defined.
    """
    start_offset = content.find('<title>')
    assert start_offset > 0, 'The HTML template has no title defined'
    start_offset = content.find('>', start_offset) + 1
    end_offset = content.find('</title>', start_offset)
    assert end_offset > 0, 'The HTML template has no title end tag.'
    return content[start_offset:end_offset]
