The PHP Dev Docs provide info for devs.

Learn how to send and receive emails and SMS in your PHP application with MailSlurp. Check out our quicklinks and basic usage guide today!

  • Table of contents

This page has moved.

MailSlurp enables the sending and receiving of emails and SMS in any PHP application.

Install MailSlurp packages

If you use the composer package manager you can run

composer require mailslurp/mailslurp-client-php

Or add it to your composer.json file:

  "repositories": [
      "type": "vcs",
      "url": ""
  "require": {
    "mailslurp/mailslurp-client-php": "*@dev"

Basic usage (creating an email address)

To create a new email address use the inbox controller:

public function test_canCreateInboxes(): void
    // create an inbox controller with config
    $inboxController = new MailSlurpApisInboxControllerApi(null, $this->config);

    // create inbox
    $inbox = $inboxController->createInbox();

    // assert on properties
    $this->assertStringContainsString("", $inbox->getEmailAddress());

Create a free account

Sign up for an account and create an API Key to for use with your client. See the getting started page for more information.