Get only NEW Emails imaplib and python

Something like this will do the trick. conn = imaplib.IMAP4_SSL(imap_server) try: (retcode, capabilities) = conn.login(imap_user, imap_password) except: print sys.exc_info()[1] sys.exit(1) conn.select(readonly=1) # Select inbox or default namespace (retcode, messages) = conn.search(None, ‘(UNSEEN)’) if retcode == ‘OK’: for num in messages[0].split(‘ ‘): print ‘Processing :’, message typ, data = conn.fetch(num,'(RFC822)’) msg = email.message_from_string(data[0][1]) typ, data = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)