Improve a bad piece of code in `sendMail`.

It used pattern matching and then catching the exception using `handle`,
which is very non-idiomatic and error prone. Also the code seemed to
catch the failure only to rethrow it.
Improve `tryCommand` so that it includes the failed server response.