Python Forum
Yahoo email "search and destroy"!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yahoo email "search and destroy"!
#20
from imap_tools import MailBox, A

with MailBox('imap.mail.yahoo.com').login('[email protected]', 'PWD', 'Bulk') as mailbox:
#    DELETE messages that contains 'a@*.*' in body from Bulk folder
    mailbox.delete(mailbox.fetch(A(body='a@*.*')))
Error output:
Error:
λ python DeleteEmailFiles.py Traceback (most recent call last): File "C:\Users\Desktop\Desktop\Python Spam Buster\DeleteEmailFiles.py", line 6, in <module> mailbox.delete(mailbox.fetch(A(body='a@*.*'))) File "C:\Users\Desktop\AppData\Local\Programs\Python\Python310\lib\site-packages\imap_tools\mailbox.py", line 176, in delete uid_str = clean_uids(uid_list) File "C:\Users\Desktop\AppData\Local\Programs\Python\Python310\lib\site-packages\imap_tools\utils.py", line 30, in clean_uids raise TypeError('uid "{}" is not string'.format(str(uid))) TypeError: uid "<imap_tools.message.MailMessage object at 0x000001A96BC7BD90>" is not string
Reply


Messages In This Thread
Yahoo email "search and destroy"! - by Linh_lee - Aug-15-2022, 04:24 AM
RE: Yahoo email "search and destroy"! - by snippsat - Aug-15-2022, 10:14 AM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-26-2022, 05:48 PM
RE: Yahoo email "search and destroy"! - by snippsat - Aug-26-2022, 07:17 PM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-26-2022, 10:04 PM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-27-2022, 01:17 AM
RE: Yahoo email "search and destroy"! - by Larz60+ - Aug-27-2022, 11:50 AM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-27-2022, 04:05 PM
RE: Yahoo email "search and destroy"! - by snippsat - Aug-27-2022, 04:30 PM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-27-2022, 05:15 PM
RE: Yahoo email "search and destroy"! - by snippsat - Aug-27-2022, 05:24 PM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-27-2022, 05:38 PM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-27-2022, 08:54 PM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-27-2022, 11:35 PM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-28-2022, 03:54 AM
RE: Yahoo email "search and destroy"! - by Linh_lee - Aug-28-2022, 06:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why does [root.destroy, exit()]) fail after pyinstaller? Rpi Edward_ 4 678 Oct-18-2023, 11:09 PM
Last Post: Edward_
  Python help for yahoo finance! Zshanar 7 3,458 Jul-31-2022, 05:27 PM
Last Post: paulyan
  Real time pricing Yahoo finance nathanz 1 2,590 Aug-09-2018, 01:02 PM
Last Post: metulburr
  An email with inline jpg cannot be read by all email clients fpiraneo 4 4,095 Feb-25-2018, 07:17 PM
Last Post: fpiraneo
  Email - Send email using Windows Live Mail cyberzen 2 5,986 Apr-13-2017, 03:14 AM
Last Post: cyberzen
  how to destroy or remove object rendered with opengl from the screen? hsunteik 1 7,105 Apr-09-2017, 01:30 PM
Last Post: hsunteik

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020