我使用VS2010 - > Extensibility->共享外接 我添加了一個事件處理程序,以我的ItemSend充分利用,SentOnBehalfOfName與應收的MailItem對象(Outlook共享加載項)的名字
applicationObject.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(applicationObject_ItemSend);
void applicationObject_ItemSend(object Item, ref bool Cancel)
{
if(Item is Outlook.MailItem)
{
Outlook.MailItem mailItem = Item as Outlook.MailItem;
if (mailItem != null)
{
MessageBox.Show("Sender's Email Address "+mailItem.SenderEmailAddress);
MessageBox.Show("Sender's Email Address "+mailItem.SentOnBehalfOfName);
MessageBox.Show("Sender's Email Address "+mailItem.SendUsingAccount);
}
}
}
mailItem.SenderEmailAddress,mailItem.SentOnBehalfOfName
和mailItem.SendUsingAccount
我歌廳這一切財產空
的請你能有人幫我出 我想從,SentOnBehalfOfName
,並從與電子郵件的發送帳戶名稱。
我能得到哪些帳戶的電子郵件地址和帳戶名稱我送的ItemSend電子郵件只 – 2013-05-07 09:49:59
是代碼,但它除非明確指定,否則可能爲null。 – 2013-05-07 19:47:00
好吧我得到了我使用mailItem.SendUsingAccount;顯示名稱和解決smtpAddress – CHANDRAHAS 2013-05-09 07:06:32