![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi
I am developing a plugin using C#, VSTO 2005 and Outlook 2003. I am trying to get the sender name (or email address) from myItem object but apparently the value is always null for this. Is this a known bug or am I doing something wrong in this. myItem.SenderName or also myItem.SenderAddress How do i get this? I really didnt want to go this route - but also tried getting it from MAPI property - PR_CREATOR_NAME - but that value is also null. FYI - I am trying to capture this value during the MailItem_ItemSend event. Can anybody please give me some pointers as to why this is not working. Thanks |
#2
|
|||
|
|||
![]()
No sender related propeties are set when the ItemSend event fires.
These properties are set by the transport provider after it asynchronously sends the message. Items.ItemAdd event on the Sent Items folder (fired after the message is sent and moved to the Sent Items folder) is the earliest you can access any sender related properties. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message ups.com... Hi I am developing a plugin using C#, VSTO 2005 and Outlook 2003. I am trying to get the sender name (or email address) from myItem object but apparently the value is always null for this. Is this a known bug or am I doing something wrong in this. myItem.SenderName or also myItem.SenderAddress How do i get this? I really didnt want to go this route - but also tried getting it from MAPI property - PR_CREATOR_NAME - but that value is also null. FYI - I am trying to capture this value during the MailItem_ItemSend event. Can anybody please give me some pointers as to why this is not working. Thanks |
#3
|
|||
|
|||
![]()
Thanks Dmitry.
If that is the case - then how do i get the sender name in MailItem_ItemSend. The reason is - there is a requirement where in the body of the email - I need to add - This email was SentBy - As you mentioned - if all that is not available - then there must be some alternate way to get that info right ? Thanks |
#4
|
|||
|
|||
![]()
Any ideas??
|
#5
|
|||
|
|||
![]()
Yes, don't use the ItemSend event. Items.ItemAdd event on the Sent Items
folder is the way to go. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message ups.com... Any ideas?? |
#6
|
|||
|
|||
![]()
Dmitry
Totally understand what you have suuggested. But I guess the problem is a little unique. In MailItem_ItemSend event - i capture the email and based on the business requirements - i have to spawn 1 email per recipient. In those new emails which are created - I need to that add those to the body of the email. Also the requirement is that new mailitem I create - i set the following proeprty : newMailItem.DeleteAfterSubmit = true; So technically they never show up in the Sent Items. You think - there are any creative ways to resolve this. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sender email address (yourself) | pjerling | Add-ins for Outlook | 1 | September 24th 07 06:27 PM |
i don't now wat url used to my email sender i have gmail | albero | Outlook - General Queries | 1 | April 24th 07 06:56 PM |
Any known issues with "sender in Address Book" rules? | Beez | Outlook - Using Contacts | 0 | March 7th 06 07:18 PM |
can i group emails by sender & by number of items for each sender | baffled_by_tech | Outlook - Using Contacts | 2 | March 5th 06 08:27 PM |
BCC and sender email | miradoro | Outlook - Using Contacts | 3 | February 27th 06 08:06 PM |