PHP code example of overtrue / laravel-sendcloud

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

    

overtrue / laravel-sendcloud example snippets


    //...
    
    'sendcloud' => [
        'api_user' => env('SENDCLOUD_API_USER', ''),
        'api_key'  => env('SENDCLOUD_API_KEY', ''),
    ],

$result = SendCloud::post('/mail/send', [
                'from' => '[email protected]',
                'to' => '[email protected]',
                'subject' => '来自 SendCloud 的第一封邮件!',
                'html' => '你太棒了!你已成功的 从SendCloud 发送了一封测试邮件!',
            ]);
            
// or 

$result = app('sendcloud')->get('addresslist/list');