![]() |
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'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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |