Get the e-mail address from a CDO.Message object

narutoo

New Member
I'm trying to render a folder "Contacts" in my Exchange Server to a ASP page. I have got the Messages collection by the following statement.<BR><BR> ' Session is Dim'ed and Set before<BR><BR> Dim CdoMessages<BR> Dim CdoMessage<BR> <BR> Set CdoMessages = CdoSession.GetDefaultFolder(CdoDefaultFolderContac ts).Messages<BR> <BR> For Each CdoMessage In CdoMessages<BR> ' Print the DisplayName of the contact<BR> Response.Write(CdoMessage.Fields(&H3001001E).Value)<BR> Response.Write("<BR>")<BR> <BR> ' Print the E-mail address of the contact<BR> Response.Write(CdoMessage.Fields(-2121596897).Value)<BR> Next<BR> <BR><BR>Assume my company's domain name is sunny.com. The e-mail addresses can be displayed in SMTP format if they are not under the same domain name. However, for those contacts have e-mail addresses with the same domain name (sunny.com). (They are also existed in the Global Address List) The e-mail address will be displayed in X.400 format.<BR><BR>Does anyone knows how to get the e-mail address of a CDO.Message object? Or is there any function can convert a X.400 e-mail address to SMTP format?<BR><BR>Thank you very much in advance.<BR><BR>Dante
 
Back
Top