imaplib.IMAP4_SSL.close

IMAP4_SSL.close()

Close currently selected mailbox.

Deleted messages are removed from writable mailbox. This is the recommended command before ‘LOGOUT’.

(typ, [data]) = <instance>.close()