PHPackages                             psyao/mailtester - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. psyao/mailtester

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

psyao/mailtester
================

Test emails in Codeception tests

1.1.0(11y ago)4631MITPHPPHP &gt;=5.4.0

Since Aug 3Pushed 11y ago1 watchersCompare

[ Source](https://github.com/psyao/mailtester)[ Packagist](https://packagist.org/packages/psyao/mailtester)[ RSS](/packages/psyao-mailtester/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

MailTester
==========

[](#mailtester)

This package is a [Codeception](http://codeception.com/) module that allows you to test that email are sent to a real SMTP server.

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

[](#installation)

Install MailTester through Composer by adding in your composer.json:

```
"require": {
    "codeception/codeception": "~2.0",
    "psyao/mailtester": "~1.1"
}
```

Configuration
-------------

[](#configuration)

First enable the module in the suite config, for example, in functional.suite.yml and choose the provider you want to use:

```
class_name: FunctionalTester
modules:
    enabled: [Filesystem, FunctionalHelper, MailTester]
    config:
        MailTester:
            provider: "MailCatcher"
```

Currently there is two providers supported.

### MailCatcher

[](#mailcatcher)

[MailCatcher](http://mailcatcher.me/) runs a super simple SMTP server which catches any message sent to it to display in a web interface. You need it installed on your development server.

```
class_name: FunctionalTester
modules:
    ...
    config:
        MailTester:
            provider: "MailCatcher"
            MailCatcher:
                url: 'http://192.168.10.10'
                port: '1080'
```

### MailTrap

[](#mailtrap)

[MailTrap](https://mailtrap.io/) is an online fake SMTP server for development teams to test, view and share emails sent from the development and staging environments.

```
class_name: FunctionalTester
modules:
    ...
    config:
        MailTester:
            provider: "MailTrap"
            MailTrap:
                api_token: 'myw0nd3rfu7ap1t0k3n'
                inbox_id: '1337'
```

Example usage
-------------

[](#example-usage)

```
