标签:default creat folder sof 主题 efault reac 中控 ati
//引用Microsoft.Office.Interop.Outlook.dll
using Outlook = Microsoft.Office.Interop.Outlook;
using Microsoft.Office.Interop.Outlook;
Outlook.Application myOutlookApp = new Outlook.Application();
Outlook.NameSpace myNameSpace = myOutlookApp.GetNamespace("MAPI");
Outlook.MAPIFolder myFolderInbox = myNameSpace.GetDefaultFolder(OlDefaultFolders.olFolderInbox);//获取收件箱对象,如获取其他箱可在参数中控制
Outlook.MAPIFolder myFolder = myFolderInbox.Folders["APPLY"];//“APPLY”为收件箱下的一个文件夹
foreach (object item in myFolder.Items)//遍历邮件
{
var mi = item as Outlook.MailItem;
Console.WriteLine(mi.Subject);//邮件主题
Console.WriteLine(mi.CreationTime);//接收时间
}
标签:default creat folder sof 主题 efault reac 中控 ati
原文地址:https://www.cnblogs.com/zhujie-com/p/12041586.html