Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @bot.timer(6)
- def timer(bot):
- global idmail
- chat = bot.chat(28746630)
- chat.send(str(idmail))
- imapper = easyimap.connect('manage.tcorporate.ml', login, password)
- try:
- for mail_id in list(imapper.listids())[::-1][idmail:]:
- mail = imapper.mail(mail_id)
- chat.send("{id} {to}\n{frommail}\n{title}\n{cc}\n{body}".format(
- id=mail_id.decode('utf-8'),
- to=mail.to,
- frommail=mail.from_addr,
- title=mail.title,
- cc=str(mail.cc),
- body=mail.body))
- idmail = mail_id.decode('utf-8')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement