auto close window on message send