Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mailpit Module for the Codeception Testing Framework

This codeception module can be used to run tests against your [Mailpit](https://github.com/axllent/mailpit) instance.
This [Codeception](https://codeception.com/) module can be used to run tests against your [Mailpit](https://github.com/axllent/mailpit) instance.

Mailpit was inspired by MailHog, which is not developed anymore. Because it is not a 1:1 replacement, the API changed
and existing MailHog codeception modules cannot be used anymore.
Expand All @@ -10,19 +10,18 @@ This codeception module is based on [oqq/codeception-email-mailhog](https://gith
brings nearly the same functionality for Mailpit as the mentioned modules did for MailHog.

## Installation
Through composer, require the package:
With Composer:
```shell
composer req koehnlein/codeception-email-mailpit --dev
composer require koehnlein/codeception-email-mailpit --dev
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a need to change this line. Why would you do it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to explain what req stands for, cause some newbies might not understand it :-)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can assume that users know how composer. The line is for simplification so that you can simply copy the command.

```
Then turn it on in your Codeception suite yaml file
Then enable it in your `Functional.suite.yml` or `Acceptance.suite.yml`:
```yaml
class_name: FunctionalTester
modules:
enabled:
- Mailpit
config:
Mailpit:
url: 'http://mailpit.dev'
url: 'http://localhost'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It know that http://mailpit.dev is not a good example, because .dev is an existing TLD. But on the other hand, http://localhost is not really much better. I would prefer to have an example where everyone understands that it musst be changed to the real needs of the current setup, something like https://your-mailpit-instance or http://example.org

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://localhost is the default URL that Mailpit runs on. So this isn't meant as some placeholder-domain, but rather the actual URL that works for new users.
Here's what I have in my Functional.suite.yml:

    config:
        Mailpit:
            url: 'http://localhost'
            port: '8025'

port: '8025'
```
Additional parameters can be fed directly to the Guzzle connection using the `guzzleRequestOptions` variable.
Expand Down