hypothesis/h — pull request #1085 by gergely-ujvari (2014-03-20 19:10:22+00:00)
Title: Introducing email notifications to page owners.

This is second part of the Email improvements PR, after being merged we can tell the w3c guys that here is our new release.

This commit introduces a new email-notification template, called: DocumentOwnerTemplate and a new consumer for our AnnotationEvent domain_notification

Description:
- The code is in a separate file, called: domain_mailer.py + 2 template files for the notification template.
- These 3 files can be always moved out from our h project and use h as an import.
- Only this part of the code uses requests, and BeautifulSoup4, so requirements will be obsolete once we move this component to a separate repo.
- For every newly created annotation we download the web page where it is created, and if needed we reparse it to look for link tags with rel='reply-to' property, to identify the document owners.
- If the email's domain match the pages domain: we send an e-mail notification to that page owner
- The DocumentOwnerTemplate has its subject and body in a separate txt template, as usual, so easy to change it.