2

如何在现有消息中保存草稿?

以下代码将执行,但草稿未保存在我的 Gmail 中:

Lazy<MailMessage>[] emails = imapClient.SearchMessages(searchCondition);
...
catch (Exception e)
{
    if (e.Source == "AE.Net.Mail")
        throw new Exception("AE.Net.Mail error: " + e.Message, e);

    imapClient.SetFlags(Flags.Seen | Flags.Draft, emails[i].Value);
    imapClient.Expunge();
    using (StringWriter writer = new StringWriter())
    {
        writer.WriteLine(e.StackTrace);
        emails[i].Value.Subject = e.Message;
        emails[i].Value.Save(writer);
    }
    imapClient.Expunge();
}

邮件标记为已查看,但未标记为草稿。我究竟做错了什么?

4

0 回答 0