Easiest way to see if the recipients are Exchange users?

D

david.ing

Hi,

I have an open Inspector window and a new mail being written. Once the
Send is hit I can subscribe to the App.ItemSend event and examine the
message.

What I need to be able to do is tell if any of the recipients on the
To/CC/ fields are Exchange users or not.

Example:

User Bob has an exchange account, and is using Outlook. He sends a
single email to Alice and Frank. Alice is on the same exchange server
as Bob, while Franks in on something else, say gmail.

I want to be able to distinguish that this message in Outlook has at
least one non-Exchange user as the destination.

Is this possible? I'm guessing some sort of CDO call for the
Recipients, plus maybe the Address Type from EMAPI property, but you
guys are smarter than me and may already know the best way. :)

Thanks!
 
S

Sue Mosher [MVP-Outlook]

Iterate the Recipients collection and check each Recipient.AddressEntry.Type. If it's "EX," it's an Exchange recipient.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top