I am using Vs2010 -> Extensibility->Shared Add-in I have added a event handler to my ItemSend
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
and mailItem.SendUsingAccount
I am geting all of this property null
Please can you anyone help me out
I want to get From, SentOnBehalfOfName
and Account name from with the email was sent.