More coe cleanup
_CatchPanic now writes the stack trace to the log
Implementing the sending of emails