public void TestDistributionList() { hMailServer.DistributionList oList = _domain.DistributionLists.Add(); oList.Address = "persis'*****@*****.**"; oList.Active = true; oList.Save(); hMailServer.DistributionListRecipient oRecipient = oList.Recipients.Add(); oRecipient.RecipientAddress = "test@te'st.com"; oRecipient.Save(); oRecipient.RecipientAddress = "tes'*****@*****.**"; oRecipient.Save(); oList.Delete(); }
public void OnDeleteObject(object sender, EventArgs args) { hMailServer.Links links = APICreator.Links; hMailServer.DistributionList list = links.get_DistributionList(_listID); if (Utility.AskDeleteItem(list.Address)) { list.Delete(); Marshal.ReleaseComObject(links); Marshal.ReleaseComObject(list); Instances.MainForm.RefreshParentNode(); } }
public void Delete() { _object.Delete(); }