如何将邮件标记为已读?

How to mark mail item as read?

我正在开发一个应用程序来保存未读 Outlook 邮件中的附件。

之后我想将邮件标记为已读,这样它就不会 运行 在同一封邮件上。

邮件仍标记为未读。

我是这样写的:

    try
        {
            foreach (object collectionItem in inBoxItems)
            {
                newEmail = collectionItem as Outlook.MailItem;
                if (newEmail != null)
                {
                    if (newEmail.Attachments.Count > 0)
                    {
                       for (int i = 1; i <= newEmail.Attachments.Count; i++)
                        {

                            string filePath = Path.Combine(destination,newEmail.Attachments[i].FileName);
                            newEmail.Attachments[i].SaveAsFile(filePath);
                        }
                        NewMail.UnRead = false;
                        NewMail.Save();
                        flag = true;
                    }
                } 
            }
            if (flag == true) 
            {
                MessageBox.Show("saved!");
                flag = false;
            }
            else
                MessageBox.Show("not saved");
        }
        catch (Exception ex)
        {
            string errorInfo = (string)ex.Message.Substring(0, 11);
                MessageBox.Show(ex.Message);
        }

NewMail.UnRead = false;更改为newMail.UnRead = false;