A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Issues with getting the Sender Name in email



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 14th 07, 10:15 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 5
Default Issues with getting the Sender Name in email

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  
Old October 15th 07, 06:48 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Issues with getting the Sender Name in email

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  
Old October 15th 07, 01:21 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 5
Default Issues with getting the Sender Name in email

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  
Old October 15th 07, 04:36 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 5
Default Issues with getting the Sender Name in email

Any ideas??

  #5  
Old October 15th 07, 06:53 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Issues with getting the Sender Name in email

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  
Old October 15th 07, 08:15 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 5
Default Issues with getting the Sender Name in email

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.