MailKit:如何回复 Gmail 对话

MailKit: How to reply to Gmail conversation

我正在使用 MailKit 回复从 Gmail 帐户收到的电子邮件。我按照 MailKit 文档中的描述设置了 In-Reply-To 和 References header 的值:

if (!string.IsNullOrEmpty(replyMessage.MessageId)) {
    message.InReplyTo = replyMessage.MessageId;
        foreach (var id in replyMessage.References) {
            message.References.Add(id);
        }
    message.References.Add(replyMessage.MessageId);
}

鉴于此,我希望回复邮件在 Gmail 中显示为对原始邮件的回复。但是,这不会发生。邮件的显示方式与其他任何随机新邮件一样。 我错过了什么吗?

您还需要将 message.Subject 设置为“回复:” + replyMessage.Subject