async def close(self):
        """
        Cleans up after the connection to the SMTP server has been closed
        (voluntarily or not).
        """
        if self.writer is not None:
            # Close the transport:
            try:
                self.writer.close()
            except OSError as exc:
                if exc.errno != errno.ENOTCONN:
                    raise

        self.reset_state()
async def close ( self ) : if self . writer is not None : try : self . writer . close ( ) except OSError as exc : if exc . errno != errno . ENOTCONN : raise self . reset_state ( )
Cleans up after the connection to the SMTP server has been closed
        (voluntarily or not).