使用Google Apps获取已发送文件夹中的未读数 [英] Getting unread count in Sent Folder using Google Apps

查看:112
本文介绍了使用Google Apps获取已发送文件夹中的未读数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让发送文件夹中的未读邮件数量?

基本上,我想要的功能是:当我回复邮件列表中已过滤并且未通过我的收件箱的邮件时,我希望所有后续回复都是到达我的收件箱。

我试图完成的方式是,如果我在已发送文件夹中看到一封未读邮件,这意味着我所涉及的线程中有一封新邮件。我是这样说的,因为当我点击Gmail的Web界面中的已发送时,我发现这些邮件是未读的。

那么,有没有一种方法可以获得未读的计数系统标签?



肮脏的方式:我可以做到这一点的一种方式是创建一个筛选器,选择具有from:作为我的地址的所有邮件,并使用它来获取我想要。但是,这样我创建了一个我不觉得好的重复!

关于Apps脚本中的GmailApp可以使用Gmail中相同的搜索功能(非常强大)。



要查看发送文件夹中的所有未读消息,请使用以下字符串搜索


是:未读标签:已发送

类似于

  var query ='is:unread label:sent'; 
var threads = GmailApp.search(query);


Is there a way to get Unread Mail count in Sent Folder?

Basically, the feature I want is: When I reply to a message in mailing list that's filtered and doesn't pass my INBOX, I want all the subsequent replies to be reaching my INBOX.

The way I'm trying to accomplish is that if I see a Unread Mail in Sent folder, that means that there is a new mail in a thread I was involved. I'm saying this because I see those mails as unread when I click "Sent" in Gmail's web interface.

So, is there a way to get unread count for a system label?

Dirty way: One way I could accomplish this is creating a filter that selects all mails that has "from:" as my address and use that to get what I want. But, this way I'm creating a duplicate of which I don't feel good about!

解决方案

One of the wonderful things about GmailApp in Apps Script is the ability to use the same search features that you have in Gmail (quite powerful).

To see all unread messages in Sent folder, search with the following string

is:unread label:sent

Something like

  var query = 'is:unread label:sent'; 
  var threads = GmailApp.search(query);

这篇关于使用Google Apps获取已发送文件夹中的未读数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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