Setup triggers resource

This sets up a Trigger model and introduces Simpler tasks for
arranging the business logic.
Implement email tasks
Add test for rejected emails
Refactor test
Set trigger EmailsSent