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

Is ItemSend really too late to set SentOnBehalfOfName ?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 7th 06, 03:02 PM posted to microsoft.public.outlook.program_addins
Oliver Giesen
external usenet poster
 
Posts: 7
Default Is ItemSend really too late to set SentOnBehalfOfName ?

Hi!

I'm trying to set the sender address of an outgoing message from within
a COM addin (written in Delphi 7). I tried doing this from the item's
Send event handler but it seems that is already too late for this
particular property... The strange thing is that I can modify other
properties like the Subject and Body without problems. I can even see
that the new sender address is being entered correctly into the
inspector's From field if I place Message Boxes in my code to pause the
execution but nevertheless, when the message arrives at the recipient
it does not use the intended sender address. Is there anything else
that needs to be done in order to ultimately apply the sender address
(I already tried re-resolving the recipients and saving the item but
without success) or is the Item Send event really too late for this
kind of modification? If so, when would be a better point in time? BTW:
hooking the Click event on the Send button is no solution for me either
as I want my addin to kick in also when a message is being sent by
pressing Ctrl+Enter .
Current testing environment is Outlook 2003.

Any ideas?

Cheers,

Oliver
  #2  
Old August 7th 06, 11:01 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Is ItemSend really too late to set SentOnBehalfOfName ?

SentOnBehalfOfName property is only applicable if you are using an Exchange
server. Is this the case?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Oliver Giesen" wrote in message
...
Hi!

I'm trying to set the sender address of an outgoing message from within
a COM addin (written in Delphi 7). I tried doing this from the item's
Send event handler but it seems that is already too late for this
particular property... The strange thing is that I can modify other
properties like the Subject and Body without problems. I can even see
that the new sender address is being entered correctly into the
inspector's From field if I place Message Boxes in my code to pause the
execution but nevertheless, when the message arrives at the recipient
it does not use the intended sender address. Is there anything else
that needs to be done in order to ultimately apply the sender address
(I already tried re-resolving the recipients and saving the item but
without success) or is the Item Send event really too late for this
kind of modification? If so, when would be a better point in time? BTW:
hooking the Click event on the Send button is no solution for me either
as I want my addin to kick in also when a message is being sent by
pressing Ctrl+Enter .
Current testing environment is Outlook 2003.

Any ideas?

Cheers,

Oliver



  #3  
Old August 7th 06, 11:15 PM posted to microsoft.public.outlook.program_addins
Oliver Giesen
external usenet poster
 
Posts: 1
Default Is ItemSend really too late to set SentOnBehalfOfName ?

Dmitry Streblechenko wrote:

SentOnBehalfOfName property is only applicable if you are using an
Exchange server. Is this the case?


Yes, it is. Setting SentOnBehalfOfName at an earlier stage, e.g.
Inspector.Activate works fine but is not what I want in this particular
case.

Cheers,

--
Oliver
----- ------------------
ICQ: 18777742 (http://wwp.icq.com/18777742)
MSN:
Y!: ogiesen
  #4  
Old August 8th 06, 06:37 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Is ItemSend really too late to set SentOnBehalfOfName ?

It could be that Outlook resolves the SentOnBehalfOfName property to the
relevant PR_SENT_REPRESENTING_xxx properties before ItemSend is called.
Did you try to set PR_SENT_REPRESENTING_xxx properties explicitly using
MAPI?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Oliver Giesen" wrote in message
...
Dmitry Streblechenko wrote:

SentOnBehalfOfName property is only applicable if you are using an
Exchange server. Is this the case?


Yes, it is. Setting SentOnBehalfOfName at an earlier stage, e.g.
Inspector.Activate works fine but is not what I want in this particular
case.

Cheers,

--
Oliver
----- ------------------
ICQ: 18777742 (http://wwp.icq.com/18777742)
MSN:
Y!: ogiesen



  #5  
Old August 8th 06, 01:57 PM posted to microsoft.public.outlook.program_addins
Oliver Giesen
external usenet poster
 
Posts: 7
Default Is ItemSend really too late to set SentOnBehalfOfName ?

Dmitry Streblechenko wrote:

It could be that Outlook resolves the SentOnBehalfOfName property to
the relevant PR_SENT_REPRESENTING_xxx properties before ItemSend is
called. Did you try to set PR_SENT_REPRESENTING_xxx properties
explicitly using MAPI?


I didn't so far but tried just now and it works great. I used
Redemption's ISafeMailItem's Fields collection to set
PR_SENT_REPRESENTING_ENTRYID and it works like a charm...

Thanks a bunch once more!


BTW: the same phenomenon appears when using the BeforeCheckNames
event... strange indeed. I mean, what's the point of the event when I
cannot adjust the recipients?

Cheers,

Oliver
  #6  
Old August 8th 06, 07:19 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Is ItemSend really too late to set SentOnBehalfOfName ?

I don't think that was done on purpose, just a plain bug IMHO.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Oliver Giesen" wrote in message
...
Dmitry Streblechenko wrote:

It could be that Outlook resolves the SentOnBehalfOfName property to
the relevant PR_SENT_REPRESENTING_xxx properties before ItemSend is
called. Did you try to set PR_SENT_REPRESENTING_xxx properties
explicitly using MAPI?


I didn't so far but tried just now and it works great. I used
Redemption's ISafeMailItem's Fields collection to set
PR_SENT_REPRESENTING_ENTRYID and it works like a charm...

Thanks a bunch once more!


BTW: the same phenomenon appears when using the BeforeCheckNames
event... strange indeed. I mean, what's the point of the event when I
cannot adjust the recipients?

Cheers,

Oliver



 




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
SentOnBehalfOfName-Custom reply form with OnBehalfAddress in combo Nathan Outlook - Using Forms 1 July 19th 06 11:45 PM
Outlook should allow reminders to disable late notifications _phil Outlook - Calandaring 1 June 21st 06 05:41 PM
Late binding sample John Outlook - General Queries 3 February 24th 06 10:32 PM
Late binding sample John Outlook and VBA 3 February 24th 06 10:32 PM
how to implement "itemsend" with vc++6.0 Ram Add-ins for Outlook 1 January 28th 06 10:22 PM


All times are GMT +1. The time now is 08:48 PM.


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.