tpmanc/blizko-mailbox

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Get blizko.ru orders and messages from mailbox

dev-master 2017-04-26 08:45 UTC

This package is not auto-updated.

Last update: 2021-10-22 06:00:06 UTC


README

Get blizko.ru orders and messages from mailbox.

REQUIREMENTS

Install via Composer

Run the following command

$ composer require tpmanc/blizko-mailbox "*"

or add

$ "tpmanc/blizko-mailbox": "*"

to the require section of your composer.json file.

Usage

$blizko = new tpmanc\blizko\Blizko('{imap.yandex.ru:993/imap/ssl}INBOX', 'login@ya.ru', 'password');
$blizko = $blizko->setLimit(50); // set mail count per page (default = 20)
$pageCount = $blizko->getPageCount(); // get page count
$blizko = $blizko->getByPage(0); // find blizko emails on first page

$orders = $blizko->getOrders(); // get array of user orders

$blizko->close();

Order object

Info about user order

...

$orders = $blizko->getOrders(); // get array of user orders
foreach ($orders as $order) {
    echo 'blizko id: ' . $message->getId();
    echo 'name: ' . $message->getUsername();
    echo 'link: ' . $message->getLink();
}
...