how to get the recipient email addresses

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
 
S

Sue Mosher [MVP-Outlook]

Iterate the Recipients collection. Each Recipient has an Address property,
as well as a name.
 
D

Darren W.

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
 
S

Sue Mosher [MVP-Outlook]

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
 

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