Commit 5b95bd9c authored by Demian's avatar Demian
Browse files

Fixed and added documentation for mail_relay_domain_* functions

parent 679f9eb2
......@@ -20,7 +20,7 @@
<p class="margin"> <span class="var">$session_id</span>, <span class="var">$client_id</span>, <span class="var">$params</span></p>
<p class="headgrp">Parameters (in <span class="var">$params</span>): </p>
<p class="margin"> server_id&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
<p class="margin"> source&nbsp;&nbsp;Recipient address (<span class="paratype">varchar(255)</span>)</p>
<p class="margin"> source&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
<p class="margin"> active&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
<p class="margin"> access&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
<p class="headgrp">Output: </p>
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>ISPCOnfig 3 remote API documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="definitionen.css">
<style type="text/css">
</style></head>
<body>
<div style="padding:40px">
<h1>mail_relay_domain_get(<span class="var">$session_id</span>, <span class="var">$primary_id</span>);</h1>
<br>
<p class="headgrp">Description: </p>
<p class="margin"> Retrieves information about a relay domain.</p><br>
<p class="headgrp">Input Variables: </p>
<p class="margin"> <span class="var">$session_id</span>, <span class="var">$primary_id</span></p>
<p class="headgrp">Parameters (in <span class="var">$params</span>): </p>
<p class="margin"> None</p>
<p class="headgrp">Output: </p>
<p class="margin"> Returns all fields and values of the chosen relay domain.</p>
<!--<b>Output:</b>
<p style="margin-left:100px">Gives a record of </p> -->
</div>
</body></html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>ISPCOnfig 3 remote API documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="definitionen.css">
<style type="text/css">
</style></head>
<body>
<div style="padding:40px">
<h1>mail_relay_domain_update(<span class="var">$session_id</span>, <span class="var">$client_id</span>, <span class="var">$primary_id</span>, <span class="var">$params</span>);</h1>
<br>
<b>Description: </b>
<p class="margin"> Updates a relay domain.</p><br>
<b>Input Variables: </b>
<p class="margin"> <span class="var">$session_id</span>, <span class="var">$client_id</span>, <span class="var">$primary_id</span>, <span class="var">$params</span></p>
<b>Parameters (in <span class="var">$params</span>): </b>
<p class="margin"> server_id&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
<p class="margin"> source&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
<p class="margin"> active&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
<p class="margin"> access&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
<b>Output: </b>
<p class="margin"> Returns the number of affected rows.</p>
<!--<b>Output:</b>
<p style="margin-left:100px">Gives a record of </p> -->
</div>
</body></html>
<?php
require 'soap_config.php';
$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri,
'trace' => 1,
'exceptions' => 1));
try {
if($session_id = $client->login($username, $password)) {
echo 'Logged successfull. Session ID:'.$session_id.'<br />';
}
//* Set the function parameters.
$relay_domain_id = 1;
// Lookup by primary key, gets back a single record.
$relay_domain = $client->mail_relay_domain_get($session_id, $relay_domain_id);
print_r($relay_domain);
if($client->logout($session_id)) {
echo 'Logged out.<br />';
}
} catch (SoapFault $e) {
echo $client->__getLastResponse();
die('SOAP Error: '.$e->getMessage());
}
?>
<?php
require 'soap_config.php';
$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri,
'trace' => 1,
'exceptions' => 1));
try {
if($session_id = $client->login($username, $password)) {
echo 'Logged successfull. Session ID:'.$session_id.'<br />';
}
//* Set the function parameters.
$client_id = 1;
$primary_id = 1;
$params = array(
'server_id' => 1,
'domain' => 'test.tld',
'active' => 'y',
'access' => 'OK'
);
$affected_rows = $client->mail_relay_domain_update($session_id, $client_id, $primary_id, $params);
echo "Affected Rows: ".$affected_rows."<br>";
if($client->logout($session_id)) {
echo 'Logged out.<br />';
}
} catch (SoapFault $e) {
echo $client->__getLastResponse();
die('SOAP Error: '.$e->getMessage());
}
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment