exception handling improvements
better mail setup