Retrieve the recipient list of a scenario
Retrieve the recipient list of a scenario
This function can access the recipient list of a scenario.
array Liste_Destinataires_Scenario( login, motdepasse, scenario)
Description
Retrieve the recipient list of a scenario.
Parameters (required)
login: customer ID (nichandle)
motdepasse: the password
scenario: scenario identifier.
Return value
An array where each row contains an email address:
- [id] => email address
Error messages
No field must be left empty login
No field must be left empty motdepasse
Authentication error (invalid login / password)
No field must be left empty scenario
This scenario does not appear to belong to you
Example with NuSOAP
include('nusoap/nusoap.php');
$client = new soapclient('https://www.eml-srv.com/_soap/control.php'); // Remove the 's' from 'https' if CURL is not installed
$parametres = array( 'login'=>'your_login', 'motdepasse'=>'your_password', scenario=>'3732' );
$variable=$client->call('Liste_Destinataires_Scenario', $parametres);
// Retrieve the error, if any
if($client->fault)
die("Error:Code: {$client->faultcode}"
. "Detail: {$client->faultactor}"
. "Solution: {$client->faultstring}");
print_r($variable);Which gives a result like:
Array
(
[0] => support@ediware.net
[1] => info@ediware.net
)Example with PHP5
try { $client = new SoapClient(null, array('location' => "https://www.eml-srv.com/_soap/control.php", 'uri' => "https://www.eml-srv.com", 'encoding'=>'ISO-8859-1' ));
$variable = $client->Liste_Destinataires_Scenario('your_login','your_password','3732'); //or //$variable = $client->__soapCall(Liste_Destinataires_Scenario,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}Last updated on