Hi
I am having some troubles in mail enabling a universal distribution group in
VB.NET 2.0.
The code:
NewGroupDE = BaseDE.Children.Add("cn=" & GroupName, "group")
NewGroupDE.Properties.Item("sAMAccountName").Value = GroupName
NewGroupDE.Properties.Item("displayName").Value = GroupName
NewGroupDE.Properties.Item("groupType").Value = &H8
NewGroupDE.Properties.Item("mailNickname").Value = GroupName.Replace(" ",
"")
NewGroupDE.CommitChanges()
NewGroupDE.NativeObject.Mail = SMTP
NewGroupDE.NativeObject.MailEnable()
NewGroupDE.CommitChanges()
NewGroupDE and BaseDE is DirectoryEntry objects. The code halts on the 2nd
last codeline, when trying to execute the MailEnable command. It's claims
that MailEnable doesn't exist on that object.
What am I missing ?
Best regards,
/Anders
|