Board index » delphi » getting my own email-address while sending!

getting my own email-address while sending!

Hi there,

I've read some articles about receiving the sender's email-addresse,
but my problem can't be solved by that:

I filter emails send by Outlook with the onsend-event.

My problem i:. I want to determin my own email-address that is used so that
I can
change the email when it's from account 1, but not from account 2.

Any idea how to do that?

the mailitem.reply.Recipients.Item(1).Address doesn't work!

If possible I'd like to do that with Outlook 97, 98, 2000 and XP.

thanks by now

Martin

 

Re:getting my own email-address while sending!


By the time OnSend is called sender address is not yet set - transport providers
(loaded by the spooler) do that.
In Outlook 2002 you might be able to change the account used for sending  by
manipulating two properties using either Extended MAPI, CDO or Redemption. The
named properties you need are (in Extended MAPI format):
Both have a GUID of {00062008-0000-0000-C000-000000000046} and ids of 0x8581 and
0x8580.
I haven't tried to manupulate these properties, but that is what changes when
you select an account from a combo in an inspector.

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

Quote
"Martin Gercke" <ger...@mobileconcepts.de> wrote in message

news:3cd05c33$1_1@dnews...
Quote
> Hi there,

> I've read some articles about receiving the sender's email-addresse,
> but my problem can't be solved by that:

> I filter emails send by Outlook with the onsend-event.

> My problem i:. I want to determin my own email-address that is used so that
> I can
> change the email when it's from account 1, but not from account 2.

> Any idea how to do that?

> the mailitem.reply.Recipients.Item(1).Address doesn't work!

> If possible I'd like to do that with Outlook 97, 98, 2000 and XP.

> thanks by now

> Martin

Other Threads