https://github.com/tpmanc/blizko-mailbox
https://github.com/tpmanc/blizko-mailbox
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tpmanc/blizko-mailbox
- Owner: tpmanc
- Created: 2017-04-25T12:22:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-26T08:45:57.000Z (almost 8 years ago)
- Last Synced: 2025-02-13T19:28:55.967Z (2 months ago)
- Language: PHP
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tiu-mail
Get blizko.ru orders and messages from mailbox.
## REQUIREMENTS
* [php imap extension](http://php.net/manual/imap.setup.php)
## Install via Composer
Run the following command
```bash
$ composer require tpmanc/blizko-mailbox "*"
```or add
```bash
$ "tpmanc/blizko-mailbox": "*"
```to the require section of your `composer.json` file.
## Usage
```php
$blizko = new tpmanc\blizko\Blizko('{imap.yandex.ru:993/imap/ssl}INBOX', '[email protected]', '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
```php
...$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();
}
...
```