【问题标题】:getting an email without the history in case of reply在回复的情况下收到没有历史记录的电子邮件
【发布时间】:2017-12-23 19:06:09
【问题描述】:

我遇到了 gmail api 的问题,

当我通过 id 使用 get 方法获取邮件内容时,在回复邮件的情况下,我无法正确隔离用户响应。
例如,这是他的电子邮件正文,

A ten, for sure. Photos are great as well as the service! 

Sent from my iPad

On Jul 17, 2017, at 11:32 AM, Steve <test@test.com> wrote:

Hi Patty! 

It would really help us if you could take 10 seconds of your time to rate your experience with Walgreens Photo Print from 0-10 below

012345678910
unsatisfied very satisfied
Thank you for taking the time to let us know what you think. We will use this information to help improve our service!

Have a great day! 

Steve

我想隔离客户的反应:“10,当然。照片和服务一样棒!”

但是,当我收到电子邮件的正文时,这似乎是不可能的。
也许我可以用线程做点什么?

【问题讨论】:

    标签: python email gmail-api


    【解决方案1】:

    Gmail API 不会解析电子邮件内容——整理回复、引用的电子邮件、原始电子邮件等完全取决于您。

    鉴于不同的电子邮件客户端可能会以不同的格式回复和引用,因此没有通用的方法来做你想做的事。

    您最好的选择可能是启发式方法:例如,“从我的 iPhone/iPad 发送”是回复已结束的一个很好的暗示。同样,Gmail 似乎在 HTML 回复负载中放置了一些 div 类,为回复文本和引用文本提供提示。

    【讨论】:

      猜你喜欢
      • 2020-12-19
      • 2023-04-07
      • 2015-06-27
      • 2011-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-28
      • 2017-07-07
      相关资源
      最近更新 更多