AE.Net.Mail - 保存现有消息的草稿

时间:2013-05-11 18:24:22

标签: c# .net imap

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

以下代码将执行,但草稿未保存在我的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();
}

邮件标记为已显示,但不是草稿。我做错了什么?

0 个答案:

没有答案