PHPackages                             edamov/mailtrap-php-sdk - 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. edamov/mailtrap-php-sdk

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

edamov/mailtrap-php-sdk
=======================

PHP SDK for Mailtrap API

v0.1.0(3y ago)016[2 PRs](https://github.com/edamov/mailtrap-php-sdk/pulls)MITPHPPHP ^8.1

Since Feb 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/edamov/mailtrap-php-sdk)[ Packagist](https://packagist.org/packages/edamov/mailtrap-php-sdk)[ Docs](https://github.com/mailtrap/mailtrap-php-sdk)[ GitHub Sponsors](https://github.com/Mailtrap)[ RSS](/packages/edamov-mailtrap-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

Mailtrap PHP SDK
================

[](#mailtrap-php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f2f726741842817638e245d2c3cd1f6ce4475ed6d1e76726b431cf455c1528ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6564616d6f762f6d61696c747261702d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/edamov/mailtrap-php-sdk)[![Tests](https://camo.githubusercontent.com/37a8a273f6ef69c8c0f1b5a0c8f37bdd3bce6b48892d2465671a89112010847f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6564616d6f762f6d61696c747261702d7068702d73646b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/edamov/mailtrap-php-sdk/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/c33188076bc0186e3e73d5c2554e3f33b752a6d48085dc553be9f4fc0efaa38f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6564616d6f762f6d61696c747261702d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/edamov/mailtrap-php-sdk)

Mailtrap PHP SDK is the Mailtrap API client for PHP developers.

To learn more about Mailtrap, refer to the [Mailtrap API Documentation](https://api-docs.mailtrap.io/).

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

[](#installation)

To get started, simply require the project using [Composer](https://getcomposer.org/).
You will also need to install packages that "provide" [`psr/http-client-implementation`](https://packagist.org/providers/psr/http-client-implementation) and [`psr/http-factory-implementation`](https://packagist.org/providers/psr/http-factory-implementation).
A list with compatible HTTP clients and client adapters can be found at [php-http.org](http://docs.php-http.org/en/latest/clients.html).

```
composer require edamov/mailtrap-php-sdk kriswallsmith/buzz nyholm/psr7
```

Usage
-----

[](#usage)

### Base example

[](#base-example)

```
require 'vendor/autoload.php';
use Mailtrap\Mail;
use Mailtrap\Mailtrap;
use Mailtrap\Recipient;
use Mailtrap\Recipients;
use Mailtrap\Sender;

$mailtrap = Mailtrap::create('api-key');

$sender = new Sender('sender@example.com', 'Sender Name');
$recipients = (new Recipients())->add(
    new Recipient('recipient@example.com', 'Recipient Name')
);

$mail = new Mail($sender, $recipients, 'Subject', 'Email body');

$mailtrap->mailSendingApi->send($mail);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Artur Edamov](https://github.com/edamov)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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

1185d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/661be6ccce2e953c01dbb2e7f048478b0ba2deb16511ea68e4ccf35f00a2f11c?d=identicon)[edamov](/maintainers/edamov)

---

Top Contributors

[![edamov](https://avatars.githubusercontent.com/u/2741880?v=4)](https://github.com/edamov "edamov (14 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

mailtrapphp-sdksdkmailtrapmailtrap-php-sdk

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/edamov-mailtrap-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/edamov-mailtrap-php-sdk/health.svg)](https://phpackages.com/packages/edamov-mailtrap-php-sdk)
```

###  Alternatives

[mailgun/mailgun-php

The Mailgun SDK provides methods for all API functions.

1.1k28.9M166](/packages/mailgun-mailgun-php)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[railsware/mailtrap-php

The Mailtrap SDK provides methods for all API functions.

56770.5k](/packages/railsware-mailtrap-php)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[mailerlite/mailerlite-api-v2-php-sdk

MailerLite API v2 PHP SDK

801.7M15](/packages/mailerlite-mailerlite-api-v2-php-sdk)

PHPackages © 2026

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