Please reply to the newsgroup only; let everybody benefit from the
discussion.
1. Changing the PR_SENDER_xxx properties won't have any effect whatsoever.
You will need to set a couple of named properties to change the "From" and
"Sender" MIME headers. See
http://www.dimastr.com/redemption/faq.htm#14 .
The example is for use with Redemption, but you get the idea.
2. If you create a COM addin (Outlook 2000 and up), you can handle
Application.ItemSend event and set the properties using the
MailItem.MAPIOBJECT property (which evaluates to IMessage). Or you can write
an Exchange Client Extension (works in all versions of Outlook): when a
message is sent,you will get
OnSubmit/OnWrite/OnWriteComplete/OnSubmitComplete events. You can use
OnWriteComplete or OnSubmitComplete callbacks to set the named properties
before the message is sent.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool