Fixed an error in in the email 'mail' service error handling.