Send a campaign
Envoi_Campagne
int Envoi_Campagne (id_campagne, login, motdepasse )
Description
Trigger the sending of the campaign with identifier id_campagne.
Parameters (required)
id_campagne: the campaign identifier (see [SOAP: List of campaigns associated with your account] to retrieve the identifier)
login: customer ID (nichandle)
motdepasse: the password
Return value
OK or an error message.
Error messages
No field must be left empty login
No field must be left empty motdepasse
Authentication error (invalid login / password)
This campaign does not appear to belong to you
No address present for this campaign
Insufficient quota to send this campaign
This campaign has already been sent
Example with NuSOAP
include('nusoap/nusoap.php');
$client = new soapclient('http://www.mdworks.info/_soap/control.php');
$parametres = array( 'id_campagne'=>'campaign identifier', 'login'=>'your_login', 'motdepasse'=>'your_password' );
$variable=$client->call('Envoi_Campagne', $parametres);
// Retrieve the error, if any
if($client->fault) die("Error:Code: {$client->faultcode}
" . "Detail: {$client->faultactor}
" . "Solution: {$client->faultstring}
");
echo 'Response:'.$variable.' ';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->Envoi_Campagne($id_campagne,'your_login','your_password'); //or //$variable = $client->__soapCall(Envoi_Campagne,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}Last updated on