PHP code example of leo108 / qq-exmail

1. Go to this page and download the library: Download leo108/qq-exmail library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

leo108 / qq-exmail example snippets


public function __construct(
    array $config = [],
    Psr\SimpleCache\CacheInterface $cache = null,
    GuzzleHttp\ClientInterface $httpClient = null,
    Psr\Log\LoggerInterface $logger = null
) 

$exmail->department->search('关键词', true); // 第二个参数为 true 时则为模糊搜索

$exmail->user->simpleList($departmentId, true); // 第二个参数为 true 时递归获取子部门成员

$exmail->user->userList($departmentId, true); // 第二个参数为 true 时递归获取子部门成员

$exmail->log->mail(Leo108\QQExmail\SystemLog\Log::MAIL_TYPE_RECEIVE_AND_SEND, '2016-10-01', '2016-10-07', [
    'userid'  => '[email protected]',
    'subject' => '查询关键词'
]);

$exmail->log->operation(Leo108\QQExmail\SystemLog\Log::OPERATION_TYPE_ALL, '2016-10-01', '2016-10-07');