...
Code Block |
---|
theme | Eclipse |
---|
language | php |
---|
title | Beispiel für die Versandauswertung von Transaktionsmails |
---|
firstline | 2 |
---|
linenumbers | true |
---|
|
$client = new SoapClient($wsdlUrl);
date_default_timezone_set('Europe/Berlin');
$statistic = new StdClass();
$statistic->mandatorId = 0;
$statistic->channelIds = array();
array_push($statistic->channelIds, 1);
$statistic->timePeriod = new StdClass();
$statistic->timePeriod->startTime = mktime(11, 38, 0, 1, 1, 2012);
$statistic->timePeriod->endTime = mktime(12, 0, 0, 4, 31, 2013);
try {
$result = $client->transactionMailSendStatistic($statistic);
var_dump($result);
} catch (Exception $e) {
echo "Fehler aufgetreten: " . $e->getMessage() . "\r\n";
} |
Code Block |
---|
theme | Eclipse |
---|
language | php |
---|
title | Beispielausgabe |
---|
firstline | 2 |
---|
linenumbers | true |
---|
|
object(stdClass)#4 (1) {
["statistic"]=>
object(stdClass)#5 (1) {
["item"]=>
object(stdClass)#6 (9) {
["channel"]=>
object(stdClass)#7 (3) {
["channelId"]=>
int(1)
["channelName"]=>
string(9) "Channel 1"
["channelDescription"]=>
string(16) "Testbeschreibung"
}
["campaignId"]=>
string(0) ""
["numRecipients"]=>
int(23)
["numDelivered"]=>
int(23)
["numQueued"]=>
int(0)
["numErrorNoRelayServer"]=>
int(0)
["numErrorNoMailbox"]=>
int(0)
["numErrorTempServer"]=>
int(0)
["numErrorTemp"]=>
int(0)
}
}
} |
Quellcode
Um ein funktionsfähiges Beispiel testen können, steht hier der Quellcode zum Download zur Verfügung.
Beispiel für die Auswertung der Transaktionsversendungen