SaveProperties() public method

public SaveProperties ( hMailServer whiteAddress ) : void
whiteAddress hMailServer
return void
Example #1
0
        private void buttonEditWhiteList_Click(object sender, EventArgs e)
        {
            if (listWhitelistingRecords.SelectedItems.Count != 1)
            {
                return;
            }

            int id = Convert.ToInt32(listWhitelistingRecords.SelectedItems[0].Tag);
            GreyListingWhiteAddresses addresses = APICreator.GreylistingWhiteAddresses;

            hMailServer.GreyListingWhiteAddress whiteAddress =
                addresses.get_ItemByDBID(id);

            formGreyListingWhiteAddress whiteDlg = new formGreyListingWhiteAddress();

            whiteDlg.LoadProperties(whiteAddress);

            if (whiteDlg.ShowDialog() == DialogResult.OK)
            {
                whiteDlg.SaveProperties(whiteAddress);

                whiteAddress.Save();

                ListWhiteListAddresses();
            }

            Marshal.ReleaseComObject(whiteAddress);
            Marshal.ReleaseComObject(addresses);
        }
Example #2
0
        private void buttonAddWhiteList_Click(object sender, EventArgs e)
        {
            formGreyListingWhiteAddress whiteDlg = new formGreyListingWhiteAddress();

            if (whiteDlg.ShowDialog() == DialogResult.OK)
            {
                hMailServer.Application app              = APICreator.Application;
                hMailServer.Settings    settings         = app.Settings;
                hMailServer.AntiSpam    antiSpamSettings = settings.AntiSpam;
                hMailServer.GreyListingWhiteAddresses greyListingWhiteAddresses = antiSpamSettings.GreyListingWhiteAddresses;
                hMailServer.GreyListingWhiteAddress   whiteAddress = greyListingWhiteAddresses.Add();

                whiteDlg.SaveProperties(whiteAddress);
                whiteAddress.Save();

                Marshal.ReleaseComObject(settings);
                Marshal.ReleaseComObject(antiSpamSettings);
                Marshal.ReleaseComObject(greyListingWhiteAddresses);
                Marshal.ReleaseComObject(whiteAddress);

                ListWhiteListAddresses();
            }
        }
Example #3
0
        private void buttonEditWhiteList_Click(object sender, EventArgs e)
        {
            if (listWhitelistingRecords.SelectedItems.Count != 1)
                return;

            int id = Convert.ToInt32(listWhitelistingRecords.SelectedItems[0].Tag);
            GreyListingWhiteAddresses addresses = APICreator.GreylistingWhiteAddresses;

            hMailServer.GreyListingWhiteAddress whiteAddress =
               addresses.get_ItemByDBID(id);

            formGreyListingWhiteAddress whiteDlg = new formGreyListingWhiteAddress();
            whiteDlg.LoadProperties(whiteAddress);

            if (whiteDlg.ShowDialog() == DialogResult.OK)
            {
                whiteDlg.SaveProperties(whiteAddress);

                whiteAddress.Save();

                ListWhiteListAddresses();
            }

            Marshal.ReleaseComObject(whiteAddress);
            Marshal.ReleaseComObject(addresses);
        }
Example #4
0
        private void buttonAddWhiteList_Click(object sender, EventArgs e)
        {
            formGreyListingWhiteAddress whiteDlg = new formGreyListingWhiteAddress();

            if (whiteDlg.ShowDialog() == DialogResult.OK)
            {
                hMailServer.Application app = APICreator.Application;
                hMailServer.Settings settings = app.Settings;
                hMailServer.AntiSpam antiSpamSettings = settings.AntiSpam;
                hMailServer.GreyListingWhiteAddresses greyListingWhiteAddresses = antiSpamSettings.GreyListingWhiteAddresses;
                hMailServer.GreyListingWhiteAddress whiteAddress = greyListingWhiteAddresses.Add();

                whiteDlg.SaveProperties(whiteAddress);
                whiteAddress.Save();

                Marshal.ReleaseComObject(settings);
                Marshal.ReleaseComObject(antiSpamSettings);
                Marshal.ReleaseComObject(greyListingWhiteAddresses);
                Marshal.ReleaseComObject(whiteAddress);

                ListWhiteListAddresses();
            }
        }