Python: Connect to Mailbox, Download Email Attachments and move email to different folder

preview_player
Показать описание
In this video I demonstrate how to use Python to connect to a mailbox, find emails that contains attachments, download those attachments to a local folder, and then move those emails to a different folder.

Same thing accomplished via

@AIPSolutions
Рекомендации по теме
Комментарии
Автор

Nice work. You are one of very few who made the code "real world" by touching upon attachments and multiple folder manipulation. That's what makes this video genuinely useful & makes it stand out from the sea of others.

michaelangellotti
Автор

Incredible!!! I searched a lot for help working with emails and attachments and your code is beautiful! It's good to know that there are people like you on the net. Thank you very much for the contribution!

alejandrofelicetti
Автор

I'm having an issue using a script very similar to this; It works, but on some emails it decides to only download 1 of the attachments in the email (although there are multiple attached). Its an intermittent issue as we have other emails in which it downloads multiple attachments from a single email with no problems at all. Suspect it might be related to the way the email is being read, and it somehow cloaking how many attachments are in the email.

KathrynThompson-or
Автор

Hello, amazing video... Here i have one question, you are using imaplib library, but i have one use case where I want to use MSAL library and generate token of each attachment and download all excel file and read it and then send it after made few changes in that excel file like in file i want to apply pivot table and that table in email body and attached that file to email. Can you pls make one video on same... Thank you in

shreenaths
Автор

When I run the job, the Email prompt comes up, but when I put in the email address, nothing happens. In your example a password prompt popped up. However in your final code, you used getpass() so why would the Password prompt pop up? When I run the job, it just freezes at a blank prompt after I type in the email. Any ideas on what I am missing? Thanks!

CDA
Автор

can u please share the video using outlook

testdata
Автор

Unfortunately there is no link to source code as mention in another comment. the information is the video good however

dazstuff
Автор

Can you share the source code of python file? Will this also work for outlook365 mails?

archanayuvaraj