PHP code example of henrick / exmailqq

1. Go to this page and download the library: Download henrick/exmailqq 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/ */

    

henrick / exmailqq example snippets


$corpid     = "test0001";  //公司ID
$corpsecret = "ii5Q4jihb1CcfyiT1TcIIq0ecmQKvRm"; //应用秘钥

//通讯录接口
$exmail = new \Henrick\ExmailQQ\ExmailQQMailList($corpid, $corpsecret);
$token = $exmail->getAccessToken(); //获取access_token
$department = $exmail->getDepartmentList($token);