wrap call in bracket to promptly close connection on exception

If an exception is thrown during sendGmail, the connection is not closed. By wrapping call in bracket sendGmail won't leak resources.