Sender email / Automatic bounce handling
Modif_Gestion_Retours_Campagne
int Modif_Gestion_Retours_Campagne (id_campagne, login, password, return_path, gestion_npai)
Description
Set the sender email and automatic bounce handling parameters of a campaign.
Parameters (required)
login: customer ID (nichandle)
motdepasse: the password
id_campagne: campaign identifier
return_path: bounce handling (NPAI) and the “Sender email” field value work together.
If bounce handling (NPAI) is disabled, the return_path “Sender email” field must contain a full email address.
If bounce handling (NPAI) is enabled, the return_path “Sender email” field must contain only the local part of an email address. The rest of the address is generated automatically by the MDWorks platform: the current campaign number plus a domain name are appended.
gestion_npai: 0 to disable automatic bounce handling, 1 to enable it.
Return value
The sender email address.
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
If automatic bounce handling is enabled, the return_path field must contain only the local part of the email address
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', 'return_path'=>'ediware', 'gestion_npai'=>'1' );
$variable=$client->call('Modif_Gestion_Retours_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->Modif_Gestion_Retours_Campagne('id_campagne','your_login','your_password','info@ediware.net','0'); //or //$variable = $client->__soapCall(Modif_Parametres_Campagne,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}