PHP code example of kostikpenzin / samotpravil

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

    

kostikpenzin / samotpravil example snippets

 php
use kostikpenzin\samotpravil\Client;

t($secretKey);
 php
$res = $client->sendEmail(
    '[email protected]',
    ''Hi, Penzin Konstantin. How are you? 😊', 
    $body,
    '[email protected]',
    [
        'params' => [
            'name_from' => 'Penzin Konstantin'
        ]
    ]
);
 php
$res = $client->getStatus(['email' => '[email protected]']);
var_dump($res);
 php
$res = $client->getStatistics('2025-01-01', '2025-01-31', 
    ['limit' => 100, 'cursor_next' => 0]);
var_dump($res);
 php
$res = $client->getNonDeliveryByDate('2025-01-01', '2025-01-31', 
    ['limit' => 100, 'cursor_next' => 0]);
var_dump($res);
 php
$res = $client->getFblReportByDate('2025-01-01', '2025-01-31', 
    ['limit' => 100, 'cursor_next' => 0]);
var_dump($res);
 php
$res = $client->stopListSearch('[email protected]');
var_dump($res);
 php
$res = $client->stopListAdd('[email protected]', "samotpravil.ru");
var_dump($res);
 php
$res = $client->stopListRemove('[email protected]', "samotpravil.ru");
var_dump($res);
 php
$res = $client->getDomains();
var_dump($res);
 php
$res = $client->domainAdd('samotpravil.ru');
var_dump($res);
 php
$res = $client->domainRemove('samotpravil.ru');
var_dump($res);
 php
$res = $client->domainCheckVerification('samotpravil.ru');
var_dump($res);