Mailkitchen Webservices documentation

Mailkitchen invites you to use Webservices to manage your databases, campaigns, statistical feedback, etc. Comprehensive documentation is presented here, offering the functions needed to use your account (create a MailKitchen account if you do not already have one). New functionalities will be added on a regular basis and details of these will be provided here (please do not hesitate to let us know of any ideas you may have by filling out our ideas box form)

Description Method : SetCampaignOption

SetCampaignOption function is used to configure a campaign. Changes are effective only after the SaveCampaign function call .

  • Syntax

    $ws->SetCampaignOption( option, value; token )
  • Parameters

    • option (string) Option name [name - subject - idSender - html - targeting]
    • valeur (string) Option's value for campaign
    • token (string) [Optional] Token from authentification
  • Return

    • Boolean result, true if option corectly setted
    • Type : boolean
  • Code exemple

    $login = 'MyLogin';
    $password = 'MyPassword';
    try {
    	$ws = new SoapClient(
    			array('trace' => 1, 'soap_version'   => SOAP_1_2)
    	$token = $ws->Authenticate($login, $password);
    	$htmlCode = '<html> ... </html>'; // source code campaign HTML
    	$ws->SetCampaignOption ('name', 'MyCampaignName');
    	$ws->SetCampaignOption ('SenderName', 'MySenderAlias');
    	$ws->SetCampaignOption ('subject', 'My campaign subject');
    	$ws->SetCampaignOption ('idSender', '2');
    	$ws->SetCampaignOption ('html', $htmlCode);
    	$ws->SetCampaignOption ('scheduledDate', '2016-05-03 10:56:00');
    catch (SoapFault $exception) { 
    	header('Content-Type: text/plain; charset: utf-8');
    	echo $exception->faultcode . ' : ' . $exception->getMessage();