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=...");
euser = (IMailRecipient) user.NativeObject;
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!