how to get the recipient email addresses

  • Thread starter Thread starter Darren W.
  • Start date Start date
D

Darren W.

Hi All, [Outlook 2000]
I have a custom form that I am using to send email from my application.
In the send event, I try to get all the email addresses to which the mail is
being sent to. But instead of email addresses, I am only getting their
names [if they are already stored in the address book].

Is there any way I can get the actual email address and not the name?

TIA
 
Iterate the Recipients collection. Each Recipient has an Address property,
as well as a name.
 
Hi Sue,
Thanks for the response, but....
when I tried to get the recipients information, it is not returning the
email addresses but a string, something like this:

/o=companyname/ou=exchangename/cn=recipients/cn=myemailid

is it possible to get the complete email address from the above string.

Thanks again.



Sue Mosher said:
Iterate the Recipients collection. Each Recipient has an Address property,
as well as a name.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Darren W. said:
Hi All, [Outlook 2000]
I have a custom form that I am using to send email from my application.
In the send event, I try to get all the email addresses to which the mail
is
being sent to. But instead of email addresses, I am only getting their
names [if they are already stored in the address book].

Is there any way I can get the actual email address and not the name?

TIA
 
To get the SMTP address from an Exchange sender or recipient, use CDO or
Redemption and the PR_EMAIL (&H39FE001E) MAPI property to obtain the SMTP
address from the AddressEntry object. See
http://www.outlookcode.com/d/code/getsenderaddy.htm#redemption and
http://www.cdolive.com/cdo5.htm#EMailAddressOfSender for examples.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Darren W. said:
Hi Sue,
Thanks for the response, but....
when I tried to get the recipients information, it is not returning the
email addresses but a string, something like this:

/o=companyname/ou=exchangename/cn=recipients/cn=myemailid

is it possible to get the complete email address from the above string.

Thanks again.



Sue Mosher said:
Iterate the Recipients collection. Each Recipient has an Address
property,
as well as a name.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Darren W. said:
Hi All, [Outlook 2000]
I have a custom form that I am using to send email from my application.
In the send event, I try to get all the email addresses to which the mail
is
being sent to. But instead of email addresses, I am only getting their
names [if they are already stored in the address book].

Is there any way I can get the actual email address and not the name?

TIA
 
Back
Top