Skip to content

Commit 84e467e

Browse files
author
Alexey Moroz
committed
SMTP: list unsubscribed emails
1 parent 34ecc93 commit 84e467e

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

src/ApiClient.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,29 @@ public function smtpGetEmailInfoById($id)
921921
return $this->handleResult($requestResult);
922922
}
923923

924+
/**
925+
* SMTP: get list of unsubscribed emails
926+
*
927+
* @param null $limit
928+
* @param null $offset
929+
*
930+
* @return mixed
931+
*/
932+
public function smtpListUnsubscribed($limit = null, $offset = null)
933+
{
934+
$data = array();
935+
if (null !== $limit) {
936+
$data['limit'] = $limit;
937+
}
938+
if (null !== $offset) {
939+
$data['offset'] = $offset;
940+
}
941+
942+
$requestResult = $this->sendRequest('smtp/unsubscribe', 'GET', $data);
943+
944+
return $this->handleResult($requestResult);
945+
}
946+
924947
/**
925948
* SMTP: add emails to unsubscribe list
926949
*

src/ApiInterface.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@ public function smtpListEmails(
267267
*/
268268
public function smtpGetEmailInfoById($id);
269269

270+
/**
271+
* SMTP: get list of unsubscribed emails
272+
*
273+
* @param null $limit
274+
* @param null $offset
275+
*/
276+
public function smtpListUnsubscribed($limit = null, $offset = null);
277+
270278
/**
271279
* Unsubscribe emails using SMTP
272280
*

0 commit comments

Comments
 (0)