如何使用 python 脚本删除 Gmail 中最大的电子邮件?
我的 Gmail 已满...我需要一种方法来从收件箱中找出最大的电子邮件并将其删除。然而,在gmail的网页界面中,我能做的就是先找出带有附件的电子邮件,然后再逐一检查附件大小。
效率太低了!
我还找到了一个 python 脚本,可以通过 imap 协议登录我的 gmail 帐户并检索电子邮件,但我没有找到检查附件大小的方法。
有人可以帮助我吗?提前致谢。
My gmail is getting full... I need a method to find out the biggest email from the Inbox and delete it. However, in the web interface of gmail, what I can do is to find out the emails with attachments first, and then check the attachement size one by one.
The efficiency is too low!
I also find a python script which could log in my gmail account and retrieve emails, via imap protocol, but I didn't find a way to check the attachment size.
Could someone help me? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Imap库有搜索方法。几乎已经有可供您使用的代码了。
Imap library has search method. There is almost ready to use code for you.