将字符串转换为GmailThread对象

时间:2018-09-27 22:55:09

标签: gmail-addons

如何将字符串转换为GmailThread对象?

var threadid = PropertiesService.getScriptProperties().getProperty('threadid');  
var msgs = threadid.getMessages(); //error

jfg

1 个答案:

答案 0 :(得分:0)

Check getThreadById(id)中的GmailApp。因此,您的代码将类似于:

var thread = GmailApp.getThreadById(threadId);
var msgs = thread.getMessages();