Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Too many emailaddresses in request! Max email addresses per request: n => Es wurden zu viele Adressen in einem Requets abgefragt, die maximal mögliche Anzahl an abzufragenden Adressen steht am Ende der Fehlermeldung.

Beispiel

Code Block
languagephp
themeEclipse
languagefirstlinephp2
titleBeispiel für das Abfragen von ABonnentendatenfirstline2
linenumberstrue
$client = new SoapClient($wsdlUrl);
date_default_timezone_set('Europe/Berlin');
$getSubscribersRequest = new StdClass();
$getSubscribersRequest->mandatorId = 0;
$getSubscribersRequest->emailAddresses = array();
array_push($getSubscribersRequest->emailAddresses, 'user@example.com');
$getSubscribersRequest->fillSubscriberFields = true;

try {
  $result = $client->getSubscribers($getSubscribersRequest);
  var_dump($result);
} catch (Exception $e) {
  echo "Error: " . $e->getMessage() . "\n";
}


Code Block
languagephp
themeEclipse
languagefirstlinephp2
titleBeispielausgabe
firstline2
linenumberstrue
object(stdClass)#3 (1) {
  ["subscribers"]=>
  object(stdClass)#4 (1) {
    ["item"]=>
    object(stdClass)#5 (5) {
      ["subscriberEmail"]=>
      string(22) user@example.com"
      ["status"]=>
      int(1)
      ["mandatorId"]=>
      int(0)
      ["newsletterListIds"]=>
      string(7) "1"
      ["subscriberFields"]=>
      object(stdClass)#6 (1) {
        ["item"]=>
        array(2) {
          [0]=>
          object(stdClass)#7 (2) {
            ["fieldName"]=>
            string(7) "VORNMER"
            ["fieldValue"]=>
            string(3) "User"
          }
        }
      }
    }
  }
}

...

Beispiel um einen Abonnenten im System abzurufen