Improve IMAP example

This commit is contained in:
Johannes Blume 2013-03-03 00:26:39 +01:00
parent d179fce441
commit 4f53f5ce8e
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,7 @@ Measure=Plugin
Plugin=Plugins\Python.dll
ScriptPath=IMAP.py
PythonHome=c:\Python33
ClassName=Measure
UpdateDivider=60
Username=username
Password=password
@ -73,5 +74,7 @@ class Measure:
con.login(self.username, self.password)
con.select('INBOX', True)
_, msgnums = con.search(None, '(UNSEEN)')
con.close()
con.logout()
return float(len(msgnums[0].split()))
```