Skip to content

Send a test

By Mounir 1 min read

Envoi_BAT
int Envoi_BAT (id_campagne, login, password, email)

Description

Send a test (BAT) for campaign id_campagne to the address email.

Parameters (required)

login: customer ID (nichandle)

motdepasse: the password

id_campagne: the campaign identifier

email: the test email address.

Return value

An error, or OK.

Error messages

No field must be left empty login

No field must be left empty motdepasse

No field must be left empty email

Authentication error (invalid login / password)

This campaign does not appear to belong to you

Example with NuSOAP

include('nusoap/nusoap.php');

$client = new soapclient('http://www.mdworks.info/_soap/control.php');

$parametres = array( 'id_campagne'=>'campaign id' 'login'=>'your_login', 'motdepasse'=>'your_password', 'email'=>'test@example.com' );

$variable=$client->call('Envoi_BAT', $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_BAT('id_campagne','your_login','your_password','info@ediware.net'); //or //$variable = $client->__soapCall(Envoi_BAT,$parametres);

print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);

}
Last updated on