【问题标题】:Detecting bounced email in a gmail integration在 gmail 集成中检测退回的电子邮件
【发布时间】:2023-03-07 11:40:01
【问题描述】:

我们希望提供 Gmail 集成以帮助用户找出所有退回的电子邮件。最好的方法是什么?用户向 xxxx@thiswillbounce.com 发送了一封电子邮件,然后从电子邮件服务器收到了一封退回的电子邮件。从 gmail API 中,我们可以看到来自退回电子邮件的一堆标题。我们可以使用这些标头以编程方式检测这是一封退回的电子邮件吗?

退回的电子邮件标题:

{ "name": "Subject", "value": "Undeliverable: Test Mail" }, { "name": "From", "value": "Microsoft Outlook <MicrosoftExchange329e71ec88ae4615bbc36ab6ce41109e@outlook.com>" } ...

【问题讨论】:

  • 我不久前回答了this question。我不确定这是否仍然是最简单的方法,但它可能会给您一些启发。

标签: email gmail gmail-api email-bounces


【解决方案1】:

您可以使用 Gmail 搜索来检测退回的电子邮件,它们大多以 mailer-daemon 作为发件人。

from:(mailer-daemon@google.com OR mailer-daemon@googlemail.com)

然后,您可以解析原始邮件的纯文本部分,以检测邮件发送到的原始收件人。

我还用 Google Scripts 写了一篇关于 detecting bounced emails in Gmail 的教程。

【讨论】:

  • 谢谢。从 Outlook 退回的电子邮件怎么样?我可以看到这些电子邮件有“mailed-by:nam02-bl2-obe.outbound.protection.outlook.com”。
猜你喜欢
  • 2017-03-15
  • 2018-02-12
  • 2013-04-15
  • 1970-01-01
  • 2023-03-26
  • 2017-03-21
  • 2019-04-16
  • 1970-01-01
  • 2012-04-17
相关资源
最近更新 更多