diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-09-08 00:59:39 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-09-08 00:59:39 +0200 |
commit | 540c3f20afb9101a8b74936843f708bed98ef38e (patch) | |
tree | 4b2d9e07dc826f407d7a8c7a9ac429c96475a2c0 /lib | |
parent | cae1053b970057da675549ca42a71db62908ed69 (diff) |
Add an option --watch to keep the connections open and wait for changes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Net/IMAP/InterIMAP.pm | 19 |
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($) { |