Outlook使用C#标记并使电子邮件变得重要

时间:2011-09-21 12:41:52

标签: c# winforms outlook

我目前正在自动发送电子邮件我已做好一切我只是希望能够标记电子邮件并将其设置为重要。我查看了Outlook帮助页面,他们告诉你大部分内容并解释清楚,但我找不到标记电子邮件或设置为重要。任何帮助是极大的赞赏。感谢

using Outlook = Microsoft.Office.Interop.Outlook;

 private void button13_Click(object sender, EventArgs e) //Send Email of Drawing
    {
        // Create the Outlook application by using inline initialization. 
        Outlook.Application oApp = new Outlook.Application();
        //Create the new message by using the simplest approach. 
        Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
        //Add a recipient
        Outlook.Recipient oRecip = (Outlook.Recipient)oMsg.Recipients.Add("email address here");
        oRecip.Resolve();
        //Set the basic properties. 
        oMsg.Subject = "Job # " + textBox9.Text + " Release (" + textBox1.Text + ")";
        oMsg.HTMLBody = "<html><body>";
        oMsg.HTMLBody += "Hello"
        //Send Message
        oMsg.Send
        //Explicitly release objects
        oRecip = null;
        oMsg = null;
        oApp = null;
     }

3 个答案:

答案 0 :(得分:2)

设置MailItem.Importance属性;

  

http://msdn.microsoft.com/en-us/library/ff866759.aspx

答案 1 :(得分:1)

MailItem.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh

应该做的伎俩

答案 2 :(得分:0)

选择以下其中一项:

oMsg.Importance = Outlook.OlImportance.olImportanceHigh; 

oMsg.Importance = Outlook.OlImportance.olImportanceNormal;

oMsg.Importance = Outlook.OlImportance.olImportanceLow;