• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

API :: Enable SpamAssassin for Email account

B

bmwbill42

Guest
Hello.. I have created the following function to enable the spam filter for an account:

function EnableSpam($Username, $DomainName)
{
$req = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?><packet version=\"1.3.4.1\"><spamfilter><set><filter><username>$Username@$DomainName</username></filter><enabled/></set></spamfilter>";
return $this->sendCommand($req);
}

$spam = rpc->EnableSpam(test,test.local);

print_r($spam);

The results of the function are:

Array ( [PACKET] => [SYSTEM] => [STATUS] => error [ERRCODE] => 1014 [ERRTEXT] => Parser error: Cannot parse the XML from the source specified )

After searching through the Plesk 8.4 API documentation I can't seem to find the correct way to enable the SpamAssassin feature on a selected mail account...
 
Back
Top