如何在现有讯息中保存草稿?
以下代码将执行,但草稿未保存在我的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();
}
邮件标记为已显示,但不是草稿。我做错了什么?