PHPackages                             rvalitov/mailslurp-php - 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. rvalitov/mailslurp-php

Abandoned → [mailslurp/mailslurp-client-php](/?search=mailslurp%2Fmailslurp-client-php)ArchivedLibrary[Mail &amp; Notifications](/categories/mail)

rvalitov/mailslurp-php
======================

MailSlurp PHP SDK for testing emails.

0.0.1(7y ago)09ISCPHPPHP &gt;=7.0

Since Nov 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rvalitov/mailslurp-php)[ Packagist](https://packagist.org/packages/rvalitov/mailslurp-php)[ Docs](https://github.com/rvalitov/mailslurp-php)[ RSS](/packages/rvalitov-mailslurp-php/feed)WikiDiscussions master Synced yesterday

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

**⚠️ The MailSlurp has now official PHP client, use it **

**So this repository is archived.**

[![API Version](https://camo.githubusercontent.com/ea04631ba41ebbf2c18f0f9ac92be3a89541ab65bdcdc09ff673ebd7a24bacf3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4150492d76302e302e312d677265656e2e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/ea04631ba41ebbf2c18f0f9ac92be3a89541ab65bdcdc09ff673ebd7a24bacf3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4150492d76302e302e312d677265656e2e7376673f7374796c653d666c6174) [![PHP](https://camo.githubusercontent.com/519ee09e03df39c3e41b2e3e2657c9f4c87ae62855c0f52543e52ff0964d3e78/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e302d2d372e322d677265656e2e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/519ee09e03df39c3e41b2e3e2657c9f4c87ae62855c0f52543e52ff0964d3e78/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e302d2d372e322d677265656e2e7376673f7374796c653d666c6174)

MailSlurp-PHP
=============

[](#mailslurp-php)

[MailSlurp](https://www.mailslurp.com) is an end-to-end email testing service. It has a [web-app](https://www.mailslurp.com/dashboard) for managing your account and a [REST API](https://api.mailslurp.com) for sending and receiving emails from randomly generated email addresses.

Why?
----

[](#why)

MailSlurp was built to test the integration of email services within an app. If your application relies on the sending or receiving of emails, then MailSlurp will let you test that functionality. This is a more common need than you might think: if your app has a sign up process that requires email verification, how do you currently test that?

Getting started
---------------

[](#getting-started)

- [API Docs](https://www.mailslurp.com/documentation)
- [Code Examples](https://www.mailslurp.com/documentation/examples)
- [Swagger Definition](https://api.mailslurp.com/v2/api-docs)

Every API request requires a valid API Key appended as a query parameter. [To obtain an API Key visit your account dashboard](https://www.mailslurp.com/dashboard).

The general flow is as follows:

- Create a new inbox during a test. The email address will be returned in the apiReponse.
- Send an email to that address or trigger an action in your test that does so.
- Fetch the email for your new inbox and check if its content is what you expected, or use the content in another action.

SDK
---

[](#sdk)

- There is an official [Javascript SDK](https://www.npmjs.com/package/mailslurp-client) available on npm.
- This PHP version was generated from [swagger JSON definition](https://api.mailslurp.com/v2/api-docs) using [swagger-codegen](https://github.com/swagger-api/swagger-codegen) and adapted for use with PHP 7.0+ (see [commits](https://github.com/rvalitov/mailslurp-php/commits/master) for a full list of changes).

Legal
-----

[](#legal)

The Mailslurp API code is owned by [PettmanUG](http://pettmanug.site) and uses a proprietary [software licence](http://www.binpress.com/license/view/l/c8376a01eca7465027a978d3fde5a1e2). The SDKs are free to use in any project and have an ISC licence.

Bugs, features, support
-----------------------

[](#bugs-features-support)

To report bugs or request features please see the [contact page](https://www.mailslurp.com/contact). For help see [support](https://www.mailslurp.com/support).

Requirements
------------

[](#requirements)

PHP 7.0 and later

Installation &amp; Usage
------------------------

[](#installation--usage)

### Composer

[](#composer)

To install the bindings via [Composer](http://getcomposer.org/), run command

```
composer require rvalitov/mailslurp-php
```

Or manually add the following to `composer.json`:

```
{
  "require": {
    "rvalitov/mailslurp-php": "^0.0.1"
  }
}
```

Then run `composer install`

### Manual Installation

[](#manual-installation)

Download the files and include `autoload.php`:

```
    require_once('/path/to/MailSlurp-PHP/vendor/autoload.php');
```

Tests
-----

[](#tests)

**Note. Tests are not implemented yet!**

To run the unit tests:

```
composer install
./vendor/bin/phpunit

```

Getting Started
---------------

[](#getting-started-1)

Please follow the [installation procedure](#installation--usage) and then run the following:

```
