CDO and alias resolve

  • We have CDO up and running in our system.  Our latest challenge is trying to resolve Exchange alias names on our network before sending out the email.  If the alias is not resolved, then we are to use another email address.  Has anyone used the resolve method for emails.  If yes, any help would be appreciated.  Thanks

  • The Resolve Method can either be applied to the Recipient Collection or to each Recipient in the collection.  The later is preferred for automatted processing.  Reason:  The Resolved Property gets set to indicate the success/failure of the Resolved Method.  If you attempt to resolve the entire collection as a whole and it returns False (Resolved Property), you do not know which Recipient was not resolvable.  I recommend you loop through the Recipients collection and apply the Resolved Method to each item, then test the Resolved Property within the loop.  That way if an address fails to resolve you can apply your alternate address.

    Hope this helps

    SET

  • Do you by chance have an example. we started playing with the resolve method of the recipients yesterday but can not seem to get it down just right.  Thanks

  • Sorry ... not able to 'share' code from current work location.

    But, here is a link to a very simple example on the MSDN site

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_creating_and_sending_a_message.asp

    Unfortunately, MS has not been really great about documenting use of CDO.  Actually, we should be thankful, if they had it would be used by scripting kiddies and hackers and they'd have to 'close it off' like they did most of the MAPI API. 

    Make sure to also check out the section describing system requirements.  You MUST have the correct CDO Library for the OS you are using.

    Once you get CDO working, you will continue to use it ... it's atable and easy.

    Good Luck,

    SET

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply