staempfli/magento2-module-mailcatcher

This package is abandoned and no longer maintained. No replacement package was suggested.

magento 2 module to catch, log and redirect emails on local and dev

Installs: 4 183

Dependents: 0

Suggesters: 0

Security: 0

Stars: 14

Watchers: 7

Forks: 3

Open Issues: 1

Type:magento2-module

2.0.3 2019-04-11 11:12 UTC

This package is auto-updated.

Last update: 2020-09-16 12:10:45 UTC


README

Project Status: Abandoned – Initial development has started, but there has not yet been a stable, usable release; the project has been abandoned and the author(s) do not intend on continuing development. Codacy Badge Code Climate Issue Count

Magento 2 module to catch, log and redirect emails on local and stage enviroments.

Features:

  • Catch and log all emails
  • Whitelist domains or emails that you do not want to catch (Merchant domain, developer emails)
  • Redirect catched emails to a trash-mail instead of logging them

Introduction

Although the recommended way to catch emails is using a mailCatcher like MailHog, this is not always easy to setup in all environments and configurations:

Facts:

  • Not all your developers have same local systems and configurations
  • Stage servers might use different mail transfer agents (sendmail, postfix)
  • Projects might use the merchant STMP server for sending emails
  • Merchants want to test how real emails are sent and not use a catching Web UI

If you have these problems, that's when this module comes in handy. This module catches emails before they reach the transfer agent. No extra tools needed for your projects, simply install and enable it on Magento Admin.

Installation

$ composer require "staempfli/magento2-module-mailcatcher":"~1.0"

Usage

Magento Admin > Stores > Configuration > Staempfli > Mail Catcher

Mail Catcher Admin Configuration

Disclaimer

This module uses a plugin on Magento\Framework\Mail\TransportInterfaceFactory::create(), watch out that your code or other modules installed do not overrite that method.

See: etc/di.xml

Tests

In order to prove that the mail catcher always work, we recommend you to run included integration tests on your CI environment. Add this into your dev/tests/integration/framework/phpunit.xml:

<directory suffix="Test.php">&magentoDir;/vendor/staempfli/magento2-module-mailcatcher/Test/Integration</directory>

Prerequisites

  • PHP >= 7.0.*
  • Magento >= 2.1.*

Developers

Juan Alonso, and all other contributors

License

Open Software License ("OSL") v. 3.0

Copyright

(c) 2017, Stämpfli AG