Skip to content

Edit campaign parameters

By Mounir 2 min read

Modif_Parametres_Campagne

int Modif_Parametres_Campagne (id_campagne, login, password, champ, valeur)

Only campaigns that have not yet been sent can be edited.

Description

Edit the parameters of a campaign.

Parameters (required)

login: customer ID (nichandle)

motdepasse: the password

id_campagne: campaign identifier

champ: name of the field whose value must be edited

value: new value of the field

List of editable fields and allowed values

FieldValue
referenceCampaign reference (internal reference)
nom_expediteurSender name
replyReply-to email address
objetMessage subject
images_jointes0 to disable image embedding, 1 to enable it
lien_desinscription0 to disable the unsubscribe link, 1 to enable it

Return value

true

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

This field is not in the list of editable fields

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 id' 'login'=>'your_login', 'motdepasse'=>'your_password', 'champ'=>'nom_expediteur', 'valeur'=>'Ediware' );

$variable=$client->call('Modif_Parametres_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_Parametres_Campagne('id_campagne','your_login','your_password','nom_expediteur','Ediware'); //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);

}
Last updated on