【问题标题】:Replying in a thread using gmail api users.messages: send is not working使用 gmail api users.messages 在线程中回复:发送不起作用
【发布时间】:2020-07-21 04:15:21
【问题描述】:

我正在使用 nodemailer 发送邮件。但是回复功能没有按预期工作。下面是在回复操作期间使用的 mailOptions。邮件已收到但未显示在同一线程中

new MailComposer({
      from: fromEmail,
      to: toAddress,
      inReplyTo: <some unique string here @mail.gmail.com>(it is a messageId from the mail am replying to),
      references: <some unique string here @mail.gmail.com>(same as inReplyTo),
      subject(same as the message am replying to),
      html,
      headers: {
        replyTo: toAddress,
        'In-Reply-To': <some unique string here @mail.gmail.com>(same as inReplyTo),
        references: <some unique string here @mail.gmail.com>(same as inReplyTo) 
      },
    });
...
api.send({
    userId: 'me',
    auth,
    requestBody: {
      raw: encodedMessage
      threadId: 'threadId from the message am replying to'
    }
  });

我错过了什么或做错了什么?

【问题讨论】:

    标签: javascript nodemailer google-api-nodejs-client


    【解决方案1】:

    确保在 mailOptionConfig 中您要回复的邮件的主题具有相同的主题。如果您更改主题,则会创建一个新线程。

    【讨论】:

      猜你喜欢
      • 2019-04-08
      • 1970-01-01
      • 2015-12-11
      • 2016-10-05
      • 2014-10-18
      • 2017-01-22
      • 2019-12-01
      • 2019-07-10
      • 2020-09-07
      相关资源
      最近更新 更多