Solved

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

Posted on 2004-09-09
3
774 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
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

810 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