Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. @bot.timer(6)
  2. def timer(bot):
  3. global idmail
  4. chat = bot.chat(28746630)
  5. chat.send(str(idmail))
  6. imapper = easyimap.connect('manage.tcorporate.ml', login, password)
  7. try:
  8. for mail_id in list(imapper.listids())[::-1][idmail:]:
  9. mail = imapper.mail(mail_id)
  10. chat.send("{id} {to}\n{frommail}\n{title}\n{cc}\n{body}".format(
  11. id=mail_id.decode('utf-8'),
  12. to=mail.to,
  13. frommail=mail.from_addr,
  14. title=mail.title,
  15. cc=str(mail.cc),
  16. body=mail.body))
  17. idmail = mail_id.decode('utf-8')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement