Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-09-09
3
Medium Priority
?
801 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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 …
Introduction to Processes

596 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