def disconnect(self):
        """Disconnects from the remote smtp server

        :return: True on success, False otherwise
        """
        if self.connected:
            try:
                self._smtp.close()
                self._connected = False
                result = True
            except Exception:  # noqa
                self._logger.exception('Something went wrong!')
                result = False
            return result
def disconnect ( self ) : if self . connected : try : self . _smtp . close ( ) self . _connected = False result = True except Exception : self . _logger . exception ( 'Something went wrong!' ) result = False return result
Disconnects from the remote smtp server

        :return: True on success, False otherwise