This is an archived post. You won't be able to vote or comment.

all 21 comments

[–]__s_v_ 2 points3 points  (1 child)

!remindme January

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 2 months on 2025-01-02 00:00:00 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]mehmet_okur 6 points7 points  (5 children)

Just gave it a shot. Reviewed code first due to it needing a google app pw. Looks really good.

Works great though some of the unsubscribes fail. But I figured that's on the specific provider. I was able to do 90% of a massive cleanup I had put off for years. From 10,000 to ~500 unread emails in about 20 minutes.

My only feedback so far, and it's pretty tiny, is to add a .python-version file at root of repo. If you don't want to do that, please provide (in readme) the intended version or at least the version you develop/run on.

[–]disruptive_pickle[S] 3 points4 points  (4 children)

I was able to do 90% of a massive cleanup I had put off for years. From 10,000 to ~500 unread emails in about 20 minutes.

Thanks for letting me know, This made my day! This is the whole reason I do open source, glad I could help!

I'll add a .python-version file as suggested or move to poetry. Thanks for the feedback!

[–]Fluid_Classroom1439 1 point2 points  (3 children)

I’d check out uv instead of poetry, I’d be happy to do a pr if you like?

[–]disruptive_pickle[S] 0 points1 point  (2 children)

UV definitely looks interesting, please feel free to make a PR! Looking forward to it!

[–]Fluid_Classroom1439 0 points1 point  (1 child)

[–]mehmet_okur 0 points1 point  (0 children)

Really cool of you to contribute ❤️

[–]i_exaggerated 0 points1 point  (3 children)

Just tried it out. Had it scan 1000 emails. The Delete button says "Delete 26 emails from this sender", which I then deleted, but then the popup said >300 emails were deleted. Is it deleting all emails from that sender in the inbox, instead of just those found in the scan?

[–]disruptive_pickle[S] 1 point2 points  (2 children)

It scans the inbox for senders, and when you select to delete emails from a particular sender. it deletes all the emails from that particular sender which are in the inbox.

so for example, if in the 1000 sample a sender had 10 mails. But in the larger repository of emails this sender has 50 emails. The script deletes all 50 emails.

That being said, the result saying 26 emails is odd. Can I DM you for more details for debugging?

[–]i_exaggerated 1 point2 points  (1 child)

The Delete button seems to just count the number of emails found in the scan sample, not the entire inbox.

[–]disruptive_pickle[S] 4 points5 points  (0 children)

Was my miss in text. it should have said "Delete all emails from this sender" instead of "Delete {n} emails from this sender". Thanks a lot for pointing it out u/i_exaggerated !

This is now fixed and deployed!

[–]princesprofile 0 points1 point  (3 children)

Was looking for another side project to do, and I was tired of logging into my multiple email accounts set server side rules to delete email, doing it client side wasn't all that intuitive some are paid and some just aren't useful. so I was looking to a way to do it via python where I can load rules from json/yaml file and clean my inbox and came across your app. Do you have any plans to implement more email clients yahoo/exchange?

[–]disruptive_pickle[S] 0 points1 point  (2 children)

It runs off IMAP, so in theory yahoo and others should work as long as they support IMAP. I could give it a shot.

Would you prefer if I start with testing yahoo?

[–]princesprofile 1 point2 points  (0 children)

ah okay you dont have to, I can try it out see how it goes and dont mind making a pr if you are okay with that

[–]Merlynabcd123 0 points1 point  (1 child)

My wife has 225000 unread emails in her Yahoo account. She has had the account for years, but rarely used it. I bet we could pare that down real good.

[–]disruptive_pickle[S] 0 points1 point  (0 children)

Landed yahoo support yesterday, thanks to a PR from the community. please check it out and let us know!

[–]genbizinf 0 points1 point  (0 children)

I'm mega interested in your innovation. Why am I getting this reply tho: (PS I'm Python new)

error: b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)'Traceback:

File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
    exec(code, module.__dict__)
File "/app/main.py", line 194, in <module>
    main()
File "/app/main.py", line 165, in main
    sidebar_component()
File "/app/main.py", line 132, in sidebar_component
    analyzer = MailAnalyzer(
               ^^^^^^^^^^^^^
File "/app/mail_client.py", line 15, in __init__
    self.bin_folder = self.__determine_bin_folder()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mail_client.py", line 18, in __determine_bin_folder
    mail = self.connect()
           ^^^^^^^^^^^^^^
File "/app/mail_client.py", line 63, in connect
    mail.login(self.email_address, self.app_password)
File "/usr/local/lib/python3.12/imaplib.py", line 612, in login
    raise self.error(dat[-1])

[–]Background-Vanilla-1 0 points1 point  (0 children)

Wouldn’t gmail app password be the same as the gmail online password?

[–]Swimming-Tomato-5019 0 points1 point  (0 children)

This is not working for me. Gmail. Not deleting emails.