Reading and Adding E-mail addresses for a mail-enabled Active Directory User

C

Chris Noble

I need to be able to read and add to the collection of email addesses for an
Active Directory User with a mailbox. I assume that this is a collection
object.
However I can't find any help on which technology to use. I can create and
access the properties for a user using
System.DirectoryServices.DirectoryEntry and then create a mailbox using
CDOEXM.IMailboxStore which adds an e-mail address automatically.

There is an email property on the General tab of Active Directory Uses and
Computers User Properties MMC which is easy to access using 'mail' property
of a DirectoryEntry user object but how do you access the collection of
E-mail addresses on the E-mail addresses tab. There is also the question of
how to set the primary e-mail address.

In the Active Directory Uses and Computers user properties MMC you add a new
e-mail address, say SMTP, and which ever address is selected as the primary
address then appears as the 'mail' property on the general tab. I need to do
this programmatically.

Any suggestions where to start please?

Thanks
 
J

Jeffrey Tan[MSFT]

Hi Chris,

You may use proxyAddresses attribute for this. It is Multivalued.

Hope it helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Chris Noble

Thanks Jeffrey

It was the term 'proxyAddresses' that I needed. I should be able to sort it
out now.

Chris
 
J

Jeffrey Tan[MSFT]

Hi Chris,

Ok, if you need further help, please feel free to tell me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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