Table des matières
Retrieve the list of recipients of a scenario
This function can access the list of recipients of a scenario.
array Recipient_list_Scenario( login, password, scenario)
Description
Retrieve the list of recipients of a scenario.
Settings (required)
login : the client identifier (nichandle)
password : the password
scenario: scenario identifier.
Back
A table where each row contains an email address:
- [id] => email address
Error messages
No field should be left empty
No field should be left empty password
Intermediate error (wrong login / password)
No field should be left empty
This scenario does not seem to belong to you
Example with NuSOAP
include('nusoap/nusoap.php'); $client = new soapclient('https://www.eml-srv.com/_soap/control.php'); // Enlever le 's' de 'https' si CURL n'est pas installé $parametres = array( 'login'=>'votre_login', 'motdepasse'=>'votre_mot_de_passe', scenario=>'3732' ); $variable=$client->call('Liste_Destinataires_Scenario', $parametres); // Récupérer l'erreur le cas échéant if($client->fault) die("Erreur:Code: {$client->faultcode}" . "Détail: {$client->faultactor}" . "Solution: {$client->faultstring}"); print_r($variable);
This gives a result of the type :
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('votre_login','votre_mot_de_passe','3732'); //ou //$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); }
This post is also available in: Français (French)