在我的VSTO Outlook 2007插件中,我可以獲取作爲交換用戶的收件人的電子郵件地址。但是,當我遇到以下情況時,它不會返回我的smtp電子郵件:獲取作爲交換用戶的收件人的電子郵件地址
- 添加新的Outlook聯繫人項目(在Outlook聯繫人中)。
- 此聯繫人項目的電子郵件地址應該是交換用戶(貴組織的任何人員,但是交換用戶)的電子郵件地址。
- 現在,當我選擇此Outlook聯繫人作爲電子郵件收件人和項目發送事件時,我無法獲取smtp地址。
下面是我的代碼:
Recipient r = mailItem.Recipients[i];
r.Resolve();
//Note, i have different conditions that check the AddressEntryUserType of recipient's
//address entry object. All other cases work fine. In this case this is
//olOutlookContactAddressEntry.
//I have tried the following:
ContactItem cont = r.AddressEntry.GetContact();
string email = cont.Email1Address;
string emailtmp = r.AddressEntry.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x800F101E") as string;
任何人都可以請幫我,我應該在這種情況下,用什麼屬性來獲取SMTP電子郵件?
我也有這個問題,並不能從收件人的電子郵件或約會項目的SMTP地址。我只能看到這樣的地址 - 「Address =」/ o = INCORPORATION/ou = Exchange Administrative Group(XXXXXXXXXXXX)/ cn = Recipients/cn = username「' – kavun 2011-07-27 13:27:19