Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何在Nodejs中使用gmail api在同一对话中回复电子邮件_Node.js_Email_Google Api_Gmail Api - Fatal编程技术网

Node.js 如何在Nodejs中使用gmail api在同一对话中回复电子邮件

Node.js 如何在Nodejs中使用gmail api在同一对话中回复电子邮件,node.js,email,google-api,gmail-api,Node.js,Email,Google Api,Gmail Api,我正在使用Gmail.users.messages.send函数使用threadId向同一对话发送回复,但它不起作用 gmail.users.messages.send({ auth: auth, userId: 'me', resource: { raw: raw, threadId:threadId }, }); 解决方案是在原始对象中添加“In Reply to”和“reference”,并使主题与您回复的邮件的主题相同

我正在使用Gmail.users.messages.send函数使用threadId向同一对话发送回复,但它不起作用

gmail.users.messages.send({
      auth: auth,
      userId: 'me',
      resource: {
    raw: raw,
    threadId:threadId
    },
    });
解决方案是在原始对象中添加“In Reply to”和“reference”,并使主题与您回复的邮件的主题相同

const raw = {
 "Content-Type: text/plain; charset=\"UTF-8\"\n" +
  "MIME-Version: 1.0\n" +
  "Content-Transfer-Encoding: 7bit\n" +
  "References: <n4Frx80qe2_bE5H5bQhgcqGk=GwFN9gs7Z_8oZw@mail.gmail.com> <CDLLRQuSHMCXLOra1NW70jvoNgR+hU59BYg@mail.gmail.com>\n" +
  "In-Reply-To: <CADsZLRwQWzLB-uq4_4G2E64NX9G6grn0cEeO0L=avY7ajzuAFg@mail.gmail.com>\n" +
  "Subject: Re: your subject\n" +
  "From: sender@gmail.com\n" +
  "To: reciever@gmail.com\n\n" +
}


gmail.users.messages.send({
      auth: auth,
      userId: 'me',
      resource: {
    raw: raw,
    },
    });
const-raw={
“内容类型:文本/纯文本;字符集=\“UTF-8\”\n”+
“MIME版本:1.0\n”+
“内容传输编码:7比特\n”+
“引用:\n”+
“答复:\n”+
“主题:Re:您的主题\n”+
“发件人:sender@gmail.com\n“+
“至:reciever@gmail.com\n\n“+
}
gmail.users.messages.send({
auth:auth,
userId:'我',
资源:{
生的:生的,
},
});

Define
它不起作用
正在发送邮件,但会为每个邮件创建一个新线程如何使用邮件提取API检索
threadId
。另外,我已经找到了解决方案。您好,我们应该在引用和回复中传递什么值?