google-apps-script编辑gmail主题行 [英] google-apps-script to edit gmail subject line

查看:133
本文介绍了google-apps-script编辑gmail主题行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是问题所在,你可以搜索并找到很多抱怨它的人:



假设你卖东西(比如经营一家小公司互联网),并使用PayPal接受付款。 PayPal发送每一条支付通知,其中包含与收到的付款通知完全相同的主题行。

因此,如果您收到Bobby Sue的付款,然后您通过PayPal(2)收到付款通知

  / code> 

和/ nothing /用于比利乔。比利是(2),但它被埋在同一个线程中。如果你处理Bobby Sue的命令并将其存档,那么也会归档Billy Jo的命令。如果您不小心,您可以忘记为该订单提供任何东西。 Billy不喜欢这样做。



我花了很长时间努力搜索一个设置或一种方法来阻止gmail做这件事,或者改变PayPal发送的内容它是主题。似乎是一个不可移动的对象和不可抗拒的力量。 *注意:是的,我知道gmail中有一个设置可以完全关闭此对话视图。但该功能对于大多数电子邮件非常有用。我只想分开这些paypal电子邮件。



有什么想法?

我唯一的想法是gmail可以被应用脚本访问,也许可以被写入以在电子邮件中找到交易ID,并在其到达时将其粘贴到主题上。但我找不到任何编辑主题行的示例脚本...任何想法,如果可能的话? 解决方案

Apps脚本无法修改电子邮件到达时的主题行,它不是用来修改入站/出站邮件,只是收件箱中的邮件执行诸如应用标签或定期转发邮件等任务。

如果您希望修改入站邮件,并且您使用Google Apps,则自定义路由规则可能会有帮助: https://support.google.com/a/answer/2368151?hl=zh_CN ,但我怀疑他们会他们不倾向于阅读信息并附上标识符。实际上,问题在于,Paypal每次收到付款时都会以相同且难以区分的方式通知您(无论您的界面,Gmail或其他方式)如果您的债权人在主题中指定名称,将会更加方便,从而使您不必打开该邮件)。您可能在这里找到的一个解决方案是利用PayPals IPN基础架构: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/ ,但除此之外您不太可能在Apps脚本中找到解决方案。

Here is the problem, and you can search and find lots of people who complain about it:

Let's say you sell something (e.g. run a small business selling on the internet) and you use PayPal to accept payments. PayPal sends every single notification of a payment with the exact same subject line "Notification of payment received".

So, if you receive a payment from Bobby Sue, and then you get a payment from Billy Jo, gmail shows:

Bobby Sue via PayPal(2)     Notification of payment received

and /nothing/ for Billy Jo. Billy is the (2), but it's buried in the same "thread"

And if you process Bobby Sue's order, and archive it, that archives Billy Jo's order as well. If you aren't careful, you can forget to ship anything for that order. And Billy don't like that.

I've searched long and hard for a setting or a way to keep gmail from doing that, or to change what PayPal sends in it's subject line. Seems to be a case of immovable object and irresistible force. *note: Yes, I know there is a setting in gmail that turns this "conversation view" off entirely. But that feature is very valuable for most emails. I only want to separate these paypal emails.

Any ideas?

My only idea is that gmail can be accessed by app scripts, and perhaps one could be written to find the transaction id in the email and tack it onto the subject when it arrives. But I can't find any example scripts that edit the subject line... Any idea if that is possible?

解决方案

Apps script won't be able to modify the subject line for an email as it arrives, it's not designed to modify inbound/outbound mail, only mail resting in the inbox to do tasks such as apply labels, or forward mail periodically.

If you're looking to modify Inbound mail, and you use Google Apps, custom routing rules might be helpful: https://support.google.com/a/answer/2368151?hl=en, but I doubt they will, as they don't tend to 'read' the message and attach an identifier.

In reality, the issue is that Paypal notifies you in an identical and hard to distinguish way every time you receive payment (No matter what your interface, Gmail or otherwise, it would be a lot handier to have your creditors name in the subject, saving you having to open the message). One solution you might find here is to leverage Paypals IPN infrastructure: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/, but otherwise It's unlikely you'll find a solution in Apps script.

这篇关于google-apps-script编辑gmail主题行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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