Added email support and an integration test