Solved

How do you mail-enable a Windows group in C#

Posted on 2004-09-09
3
790 Views
Last Modified: 2008-01-09
I need to mail-enable a standard Active Directory group in a C# program. For a user object the following code works fine:

DirectoryEntry user = new DirectoryEntry("LDAP://cn=user,dc=...");
CDOEXM.IMailRecipient euserl;  
euser = (IMailRecipient) user.NativeObject;
euser.MailEnable("SMTP:username@exhange.domain.com);  

If I create a directory entry pointing to a group object, the call to MailEnable gives the error "The parameter is incorrect". I presume it's referring to the "SMTP:..." string, although that is a required parameter. I suspect it's a very simple problem but it's difficult to find information on CDOEXM. I've run out of google searches!
0
Comment
Question by:phsteele
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Author Comment

by:phsteele
ID: 12179212
I found a very simple solution. To mail enable a group the call to MailEnable must have an emptry string. For example:

group.MailEnable("");
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12393981
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Six Sigma Control Plans

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question