PHP code example of stuchilde / submail-php-sdk

1. Go to this page and download the library: Download stuchilde/submail-php-sdk 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/ */

    

stuchilde / submail-php-sdk example snippets

 bash
$ composer 
json
""submail/submail-php-sdk" : "~1.0"
}
 bash
$ php artisan vendor:publish --tag=config
 php
 
$obj->set_category('message');
$to =    '130*******';
$content    =   "【SUBMAIL】您的短信验证码:4438,请在10分钟内输入。";
$res    =   $obj->messageSend($to,$content);
 php
 
$obj->set_category('message');
$to =    '130*******';
$vars   =   array('code'=>rand(100,999));
$res    =   $obj->messagexSend($to,$vars);