<bdo id='4ijJb'></bdo><ul id='4ijJb'></ul>

      <legend id='4ijJb'><style id='4ijJb'><dir id='4ijJb'><q id='4ijJb'></q></dir></style></legend>
    1. <small id='4ijJb'></small><noframes id='4ijJb'>

    2. <i id='4ijJb'><tr id='4ijJb'><dt id='4ijJb'><q id='4ijJb'><span id='4ijJb'><b id='4ijJb'><form id='4ijJb'><ins id='4ijJb'></ins><ul id='4ijJb'></ul><sub id='4ijJb'></sub></form><legend id='4ijJb'></legend><bdo id='4ijJb'><pre id='4ijJb'><center id='4ijJb'></center></pre></bdo></b><th id='4ijJb'></th></span></q></dt></tr></i><div id='4ijJb'><tfoot id='4ijJb'></tfoot><dl id='4ijJb'><fieldset id='4ijJb'></fieldset></dl></div>
      <tfoot id='4ijJb'></tfoot>
      1. 使用 Python 解析 Gmail 并将所有早于日期的内容标记为“已读"

        Parse Gmail with Python and mark all older than date as quot;readquot;(使用 Python 解析 Gmail 并将所有早于日期的内容标记为“已读)

        <legend id='GgrA3'><style id='GgrA3'><dir id='GgrA3'><q id='GgrA3'></q></dir></style></legend>

          <i id='GgrA3'><tr id='GgrA3'><dt id='GgrA3'><q id='GgrA3'><span id='GgrA3'><b id='GgrA3'><form id='GgrA3'><ins id='GgrA3'></ins><ul id='GgrA3'></ul><sub id='GgrA3'></sub></form><legend id='GgrA3'></legend><bdo id='GgrA3'><pre id='GgrA3'><center id='GgrA3'></center></pre></bdo></b><th id='GgrA3'></th></span></q></dt></tr></i><div id='GgrA3'><tfoot id='GgrA3'></tfoot><dl id='GgrA3'><fieldset id='GgrA3'></fieldset></dl></div>
        1. <small id='GgrA3'></small><noframes id='GgrA3'>

            • <tfoot id='GgrA3'></tfoot>
                <tbody id='GgrA3'></tbody>
              • <bdo id='GgrA3'></bdo><ul id='GgrA3'></ul>
                  本文介绍了使用 Python 解析 Gmail 并将所有早于日期的内容标记为“已读"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  长话短说,我创建了一个新的 gmail 帐户,并将其他几个帐户关联到该帐户(每个帐户都有 1000 条消息),我正在导入这些帐户.所有导入的邮件都以未读的形式到达,但我需要它们显示为已读.

                  Long story short, I created a new gmail account, and linked several other accounts to it (each with 1000s of messages), which I am importing. All imported messages arrive as unread, but I need them to appear as read.

                  我对python有一点经验,但是我只使用过mail和imaplib模块来发送邮件,没有处理账户.

                  I have a little experience with python, but I've only used mail and imaplib modules for sending mail, not processing accounts.

                  有没有办法批量处理收件箱中的所有项目,并将早于指定日期的邮件标记为已读?

                  Is there a way to bulk process all items in an inbox, and simply mark messages older than a specified date as read?

                  推荐答案

                  typ, data = M.search(None, '(BEFORE 01-Jan-2009)')
                  for num in data[0].split():
                     M.store(num, '+FLAGS', '\Seen')
                  

                  这是对 imaplib 文档页面中的代码的轻微修改存储方法.我从 RFC 3501 中找到了要使用的搜索条件.这应该可以帮助您入门.

                  This is a slight modification of the code in the imaplib doc page for the store method. I found the search criteria to use from RFC 3501. This should get you started.

                  这篇关于使用 Python 解析 Gmail 并将所有早于日期的内容标记为“已读"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)

                      <legend id='aVO0M'><style id='aVO0M'><dir id='aVO0M'><q id='aVO0M'></q></dir></style></legend>
                        <bdo id='aVO0M'></bdo><ul id='aVO0M'></ul>

                        <i id='aVO0M'><tr id='aVO0M'><dt id='aVO0M'><q id='aVO0M'><span id='aVO0M'><b id='aVO0M'><form id='aVO0M'><ins id='aVO0M'></ins><ul id='aVO0M'></ul><sub id='aVO0M'></sub></form><legend id='aVO0M'></legend><bdo id='aVO0M'><pre id='aVO0M'><center id='aVO0M'></center></pre></bdo></b><th id='aVO0M'></th></span></q></dt></tr></i><div id='aVO0M'><tfoot id='aVO0M'></tfoot><dl id='aVO0M'><fieldset id='aVO0M'></fieldset></dl></div>

                      • <small id='aVO0M'></small><noframes id='aVO0M'>

                        • <tfoot id='aVO0M'></tfoot>
                            <tbody id='aVO0M'></tbody>