Standardize error handler
Finish setting up mail system, task #15