Environment: .Net (C# in particular, but I can read VB easily too)
I would like to retrieve (get) the entire domain blacklist, add an IP address(es) to the domain blacklist, and delete a listed IP address from the domain blacklist. What would be the code?
I got as far as the following, but did not see how to use what I have:
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using MailEnable.Administration;
namespace MyNamespace
{
class myClass
{
public static Boolean GetBlacklistEntries(out String[] BlacklistIps)
{
// Initialize: Output
BlacklistIps = null;
try
{
// Create a login to the service.
Login oLogin = new Login()
{
UserName = ServiceUsername,
Password = ServicePassword,
Host = ServiceUrl,
};
int idLogin = oLogin.GetLogin();
// Get: Blacklist
DomainBlacklist oBlacklist = new DomainBlacklist()
{
Host = ServiceUrl,
};
return true;
}
catch (Exception ex)
{
...
}
return false;
}
}
}
My problem is that I did not see a doLogin method or any useful response, which I would pass to the DomainBlacklist() class. I saw the Host/SetHost property, but did not see anything else.