Spike to get email delivery working

* Tests pending
* Refactoring pending