imaplib - Gmail中存档/所有邮件的文件夹名称是正确的? [英] imaplib - What is the correct folder name for Archive/All Mail in Gmail?

查看:258
本文介绍了imaplib - Gmail中存档/所有邮件的文件夹名称是正确的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个脚本将Gmail中的所有电子邮件作为文本文件导出。



可以在选择文件夹的这一行中正常工作:

  mail.select(inbox)

但我不知道Gmail的存档的名称,其中存储了所有的电子邮件。任何人都知道正确的名字?

解决方案

解决它。



它是 [Gmail] / All Mail 或者,如果您是像我这样的Gmail英国用户,可能是 [Google Mail] / All Mail ,因为Gmail以前在英国被称为Google Mail,因为商标问题。



如果你这样做是为了普遍使用,我建议测试看看是否 [Gmail] / All Mail 工作(最常见),如果没有测试 [Google Mail] / All Mail



最后一个对我来说很合适。


I have a script which exports all the email in Gmail as text files.

It works fine with this line where you select the folder:

mail.select("inbox")

But I am not sure what the name is for Gmail's archive, where all of the email is stored. I've tried archive and all mail and stuff, but no luck.

Anyone know the correct name?

解决方案

Solved it.

It is [Gmail]/All Mail or, if you are a Gmail UK user like me, it may be [Google Mail]/All Mail, because Gmail used to be called Google Mail in the UK due to trademark issues.

If you're doing this for general use, I'd recommend testing to see if [Gmail]/All Mail works (most common), and if not testing for [Google Mail]/All Mail.

The last one works perfectly for me.

这篇关于imaplib - Gmail中存档/所有邮件的文件夹名称是正确的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆