aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/IMAP/InterIMAP.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm
index 35d2075..97756f4 100644
--- a/lib/Net/IMAP/InterIMAP.pm
+++ b/lib/Net/IMAP/InterIMAP.pm
@@ -526,6 +526,25 @@ sub examine($$;$$) {
}
+# $self->unselect()
+# Issue an UNSELECT command (cf. RFC 3691). Upon success, change the
+# state to AUTH.
+sub unselect($) {
+ my $self = shift;
+
+ $self->_send('UNSELECT');
+
+ $self->{_STATE} = 'AUTH';
+ delete $self->{_SELECTED};
+
+ # it is safe to wipe cached VANISHED responses or FLAG updates,
+ # because interesting stuff must have made the mailbox dirty so
+ # we'll get back to it
+ $self->{_VANISHED} = [];
+ $self->{_MODIFIED} = {};
+}
+
+
# $self->logout()
# Issue a LOGOUT command. Change the state to LOGOUT.
sub logout($) {