Adding a retry based email sending system

- Fixes #547 
This is an alternative to #663. I think I like this one better.