fixes minor issue with cancelling test mail send.
adds exception handler.
catch an exception.