Correct exception handling.

Modified exception handling/mailing. Corrected exception message parsing for sending to mailer.