Submit
Path:
~
/
/
proc
/
self
/
root
/
opt
/
plesk
/
python
/
3
/
lib
/
python3.10
/
site-packages
/
imapclient
/
examples
/
File Content:
idle_example.py
# This example is a lot more interesting if you have an active client # connected to the same IMAP account! from __future__ import unicode_literals from imapclient import IMAPClient HOST = 'imap.host.com' USERNAME = 'someuser' PASSWORD = 'password' ssl = True server = IMAPClient(HOST, use_uid=True, ssl=ssl) server.login(USERNAME, PASSWORD) server.select_folder('INBOX') # Start IDLE mode server.idle() # Wait for up to 30 seconds for an IDLE response responses = server.idle_check(timeout=30) print(responses) # Come out of IDLE mode text, responses = server.idle_done() print('IDLE done. Server said %r' % text) print('Final responses: ', responses) print(server.logout())
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
__pycache__
---
0755
example.py
874 bytes
0644
idle_example.py
713 bytes
0644
oauth2_example.py
451 bytes
0644
tls_cacert.py
453 bytes
0644
tls_no_checks.py
659 bytes
0644
N4ST4R_ID | Naxtarrr