PHPackages                             kostikpenzin/samotpravil - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. kostikpenzin/samotpravil

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

kostikpenzin/samotpravil
========================

Samotpravil for PHP library.

0.0.1(1y ago)17MITPHPPHP &gt;=8.0

Since Nov 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kostikpenzin/samotpravil)[ Packagist](https://packagist.org/packages/kostikpenzin/samotpravil)[ Docs](https://github.com/kostikpenzin/samotpravil)[ RSS](/packages/kostikpenzin-samotpravil/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Library in Php for sending emails through the service samotpravil.ru
====================================================================

[](#library-in-php-for-sending-emails-through-the-service-samotpravilru)

[![Latest Stable Version](https://camo.githubusercontent.com/70972a8cdc50c684de935eef37d8f5ce23d019f2c7f95d808213c2abe1f8ceb8/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f73616d6f7470726176696c2f762f737461626c65)](https://packagist.org/packages/kostikpenzin/samotpravil)[![Total Downloads](https://camo.githubusercontent.com/d8e399eb3a5a523b03cd1db28147c50f15da4d51ee2a7e2168fd154ad6195164/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f73616d6f7470726176696c2f646f776e6c6f616473)](https://packagist.org/packages/kostikpenzin/samotpravil)[![Latest Unstable Version](https://camo.githubusercontent.com/22e6d2b35d24a1bfc1726c18c8543253418cbe741817a913ecaa42f8e7b8799f/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f73616d6f7470726176696c2f762f756e737461626c65)](https://packagist.org/packages/kostikpenzin/samotpravil)[![License](https://camo.githubusercontent.com/bf46808654bd8d35171c7d8b3dcd98082a360612953d5c4bbfe9f9e79ff35328/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f73616d6f7470726176696c2f6c6963656e7365)](https://packagist.org/packages/kostikpenzin/samotpravil)[![Monthly Downloads](https://camo.githubusercontent.com/89315bc8596f7813c03d0a8867ebc25ad040282312d4ed4f0f71db12eaf1ceab/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f73616d6f7470726176696c2f642f6d6f6e74686c79)](https://packagist.org/packages/kostikpenzin/samotpravil)

This library is forked by kostikpenzin/samotpravil, it helps you send e-mails through [Samotpravil](https://samotpravil.ru) in PHP 8.0 and above.

Official site: [Samotpravil](https://samotpravil.ru/)

Full documentation REST API: [documentation.samotpravil.ru](https://documentation.samotpravil.ru/)

Installation
------------

[](#installation)

Install the library using [Composer](https://getcomposer.org/):

```
$ composer require kostikpenzin/samotpravil

```

Usage
-----

[](#usage)

```
use kostikpenzin\samotpravil\Client;

require dirname(__DIR__) . '/vendor/autoload.php';

$secretKey = 'xxxx';
$client = new Client($secretKey);
```

### sendEmail: Sends an email using the Samotpravil API.

[](#sendemail-sends-an-email-using-the-samotpravil-api)

```
$res = $client->sendEmail(
    'penzin85@gmail.com',
    ''Hi, Penzin Konstantin. How are you? 😊',
    $body,
    'info@samotpravil.ru',
    [
        'params' => [
            'name_from' => 'Penzin Konstantin'
        ]
    ]
);
```

### getStatus: Gets the status of sent emails.

[](#getstatus-gets-the-status-of-sent-emails)

```
$res = $client->getStatus(['email' => 'penzin85@gmail.com']);
var_dump($res);
```

### getStatistics: Gets statistics of sent emails between specified dates.

[](#getstatistics-gets-statistics-of-sent-emails-between-specified-dates)

```
$res = $client->getStatistics('2025-01-01', '2025-01-31',
    ['limit' => 100, 'cursor_next' => 0]);
var_dump($res);
```

### getNonDeliveryByDate: Retrieves non-delivery report for emails between specified dates.

[](#getnondeliverybydate-retrieves-non-delivery-report-for-emails-between-specified-dates)

```
$res = $client->getNonDeliveryByDate('2025-01-01', '2025-01-31',
    ['limit' => 100, 'cursor_next' => 0]);
var_dump($res);
```

### getFblReportByDate: Retrieves FBL report for emails between specified dates.

[](#getfblreportbydate-retrieves-fbl-report-for-emails-between-specified-dates)

```
$res = $client->getFblReportByDate('2025-01-01', '2025-01-31',
    ['limit' => 100, 'cursor_next' => 0]);
var_dump($res);
```

### stopListSearch: Searches for an email in the stop list.

[](#stoplistsearch-searches-for-an-email-in-the-stop-list)

```
$res = $client->stopListSearch('penzin85@gmail.com');
var_dump($res);
```

### stopListAdd: Adds an email to the stop list.

[](#stoplistadd-adds-an-email-to-the-stop-list)

```
$res = $client->stopListAdd('penzin85@gmail.com', "samotpravil.ru");
var_dump($res);
```

### stopListRemove: Removes an email from the stop list.

[](#stoplistremove-removes-an-email-from-the-stop-list)

```
$res = $client->stopListRemove('penzin85@gmail.com', "samotpravil.ru");
var_dump($res);
```

### getDomains: Gets a list of all domains that have been added to the list of allowed domains.

[](#getdomains-gets-a-list-of-all-domains-that-have-been-added-to-the-list-of-allowed-domains)

```
$res = $client->getDomains();
var_dump($res);
```

### domainAdd: Adds a domain to the list of allowed domains.

[](#domainadd-adds-a-domain-to-the-list-of-allowed-domains)

```
$res = $client->domainAdd('samotpravil.ru');
var_dump($res);
```

### domainRemove: Removes a domain from the list of allowed domains.

[](#domainremove-removes-a-domain-from-the-list-of-allowed-domains)

```
$res = $client->domainRemove('samotpravil.ru');
var_dump($res);
```

### domainCheckVerification: Verifies the given domain using Samotpravil API.

[](#domaincheckverification-verifies-the-given-domain-using-samotpravil-api)

```
$res = $client->domainCheckVerification('samotpravil.ru');
var_dump($res);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

534d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91e9cbcca0b902019fbc065d783f7953d99b744cb4a209e43167be3ba8bf6367?d=identicon)[penzin85](/maintainers/penzin85)

---

Top Contributors

[![kostikpenzin](https://avatars.githubusercontent.com/u/5538990?v=4)](https://github.com/kostikpenzin "kostikpenzin (12 commits)")

---

Tags

mailsamotpravilsmpt

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kostikpenzin-samotpravil/health.svg)

```
[![Health](https://phpackages.com/badges/kostikpenzin-samotpravil/health.svg)](https://phpackages.com/packages/kostikpenzin-samotpravil)
```

###  Alternatives

[coconutcraig/laravel-postmark

Laravel package for sending mail via the Postmark API

2152.9M1](/packages/coconutcraig-laravel-postmark)[thinkshout/mailchimp-api-php

PHP library for v3 of the MailChimp API

824.6M1](/packages/thinkshout-mailchimp-api-php)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[postal/postal

Postal for PHP library.

81305.4k14](/packages/postal-postal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
