Python Forum
Yahoo email "search and destroy"!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yahoo email "search and destroy"!
#15
Quote:Somewhere in this line you are passing an argument to a function that is supposed to be a string, but is instead a mailbox object. I would split the line in half to find out which call failed.
x = mailbox.fetch(A(body='a@*.*'))
print(x, type(x))
mailbox.delete(x)
When you run this you'll find out out if the problem is with fetch() or delete().

So the issue is with fetch()?

Is it a syntax issue with 'a@*.*' ?

Output below:
Error:
λ python DeleteEmailFiles.py File "C:\Users\Desktop\Desktop\Python Spam Buster\DeleteEmailFiles.py", line 8 x = mailbox.fetch(A(body='a@*.*')) ^ IndentationError: expected an indented block after 'with' statement on line 4
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 712 Oct-18-2023, 11:09 PM
Last Post: Edward_
  Python help for yahoo finance! Zshanar 7 3,524 Jul-31-2022, 05:27 PM
Last Post: paulyan
  Real time pricing Yahoo finance nathanz 1 2,618 Aug-09-2018, 01:02 PM
Last Post: metulburr
  An email with inline jpg cannot be read by all email clients fpiraneo 4 4,142 Feb-25-2018, 07:17 PM
Last Post: fpiraneo
  Email - Send email using Windows Live Mail cyberzen 2 6,023 Apr-13-2017, 03:14 AM
Last Post: cyberzen
  how to destroy or remove object rendered with opengl from the screen? hsunteik 1 7,127 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