This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24efbd0
commit 913be64
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
require('../ET_Client.php'); | ||
try { | ||
$myclient = new ET_Client(); | ||
|
||
// Modify the date below to reduce the number of results returned from the request | ||
// Setting this too far in the past could result in a very large response size | ||
|
||
$retrieveDate = "2015-01-15T13:00:00.000"; | ||
|
||
// Retrieve Filtered Send with GetMoreResults | ||
print "Retrieve Filtered Send with GetMoreResults \n"; | ||
$getSend = new ET_Send(); | ||
$getSend->authStub = $myclient; | ||
$getSend->props = array("ID","PartnerKey","CreatedDate","ModifiedDate","Client.ID","Client.PartnerClientKey","Email.ID","Email.PartnerKey","SendDate","FromAddress","FromName","Duplicates","InvalidAddresses","ExistingUndeliverables","ExistingUnsubscribes","HardBounces","SoftBounces","OtherBounces","ForwardedEmails","UniqueClicks","UniqueOpens","NumberSent","NumberDelivered","NumberTargeted","NumberErrored","NumberExcluded","Unsubscribes","MissingAddresses","Subject","PreviewURL","SentDate","EmailName","Status","IsMultipart","SendLimit","SendWindowOpen","SendWindowClose","IsAlwaysOn","Additional","BCCEmail","EmailSendDefinition.ObjectID","EmailSendDefinition.CustomerKey"); | ||
$getSend->filter = array('Property' => 'SendDate','SimpleOperator' => 'greaterThan','DateValue' => $retrieveDate); | ||
$getSend->getSinceLastBatch = false; | ||
$getResponse = $getSend->get(); | ||
print_r('Get Status: '.($getResponse->status ? 'true' : 'false')."\n"); | ||
print 'Code: '.$getResponse->code."\n"; | ||
print 'Message: '.$getResponse->message."\n"; | ||
print_r('More Results: '.($getResponse->moreResults ? 'true' : 'false')."\n"); | ||
print 'Results Length: '. count($getResponse->results)."\n"; | ||
print "\n---------------\n"; | ||
|
||
while ($getResponse->moreResults) { | ||
print "Continue Retrieve Send with GetMoreResults \n"; | ||
$getResponse = $getSend->GetMoreResults(); | ||
print_r('Get Status: '.($getResponse->status ? 'true' : 'false')."\n"); | ||
print 'Code: '.$getResponse->code."\n"; | ||
print 'Message: '.$getResponse->message."\n"; | ||
print_r('More Results: '.($getResponse->moreResults ? 'true' : 'false')."\n"); | ||
print 'Results Length: '. count($getResponse->results)."\n"; | ||
print "\n---------------\n"; | ||
} | ||
} | ||
catch (Exception $e) { | ||
echo 'Caught exception: ', $e->getMessage(), "\n"; | ||
} | ||
|
||
?> | ||
|
||
|
||
|