【发布时间】:2014-02-03 04:08:25
【问题描述】:
我正在尝试使用以下代码从 Outlook (2007) 获取联系人:
Outlook.Application outlookApp = new Outlook.Application();
Outlook.MAPIFolder fldContacts = outlookApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts) as Outlook.MAPIFolder;
foreach (Outlook._ContactItem contact in fldContacts.Items) {...}
问题是当我尝试获取电子邮件地址时,我收到了来自 Outlook 的警告,类似于:
A program is trying to access e-mail address information stored in Outlook.
If this is unexpected, click Deny and verify your antivirus software is up-to-date.
For more information about e-mail safety and how you might be able to avoid getting this warning, click Help.
我希望用户有一个干净的体验(这个提取是为了根据他们的邮件地址向应用程序添加新朋友)。 Skype 无需 Outlook 要求用户批准就可以做到这一点。到目前为止,我由 Google 叔叔找到的解决方案大多是肮脏的黑客,我想知道是否有一种干净的方法来做到这一点。
想法?
【问题讨论】: