Magento 2 Email Catcher or Email Logger Module. Available At Packagist.

Overview

Magento 2 Module Experius email catcher / - logger

``experius/module-emailcatcher``

Main Functionalities

  • Log all Emails send by Magento
  • View email contecnt in popup (Nice for testing and styling)
  • Forward a catched email
  • Resend a catched email
  • Cleanup of emails older then 30 days (cron or manual)
  • Send emails based on whitelisted email templates

Versions

  • Version 3.0.0 or higher is fully compatible with 2.2.x and 2.3.x

[Please note that from 3.0.0 onward the composer require changed to experius/module-emailcatcher]

  • Version 2.0.0 or higher is compatible with Magento 2.2 or higher
  • Version 1.3.2 or higher is compatible with Magento 2.1.8 or higher
  • Version lower then 1.3.2 could still be used for Magento 2.1.7 or lower but we recommend to install a newer version

Installation

In production please use the --keep-generated option

Type 1: Zip file

  • Unzip the zip file in app/code/Experius
  • Enable the module by running php bin/magento module:enable Experius_EmailCatcher
  • Apply database updates by running php bin/magento setup:upgrade
  • Flush the cache by running php bin/magento cache:flush

Type 2: Composer

  • Make the module available in a composer repository for example:
    • private repository repo.magento.com
    • public repository packagist.org
    • public github repository as vcs
  • Add the composer repository to the configuration by running composer config repositories.repo.magento.com composer https://repo.magento.com/
  • Install the module composer by running composer require experius/module-emailcatcher
  • Enable the module by running php bin/magento module:enable Experius_EmailCatcher
  • Apply database updates by running php bin/magento setup:upgrade
  • Flush the cache by running php bin/magento cache:flush

Enable email catcher

Enable Email Catcher.

  • Stores > Settings > Configuration > Advanced > Email Catcher > General > Enable Email Catcher (emailcatcher/general/enabled)

Disable email sending (default Magento, advised for development)

  • Stores > Settings > Configuration > Advanced > System > Mail Sending Settings > Disable Email Communications (system/smpt/disable)

Utilise whitelist functionality

  • Stores > Settings > Configuration > Advanced > Email Catcher > Whitelist > Apply whitelist (emailcatcher/whitelist/apply_whitelist)
  • Stores > Settings > Configuration > Advanced > Email Catcher > Whitelist > Whitelisted templates (emailcatcher/whitelist/email_templates)

Admin grid

  • System > Tools > Email Catcher

Change log

Version 3.1.0 - November 8th, 2019

  • [FEATURE] Created preferences on Magento email classes (Transport / TransportBuilder) to preserve template identifier on email transport. This will allow filtering of email sending (in sendMessage()) based of configurable template whitelist.
  • [FEATURE] Added logic to check email versus whitelisted templates and send those configured to be whitelisted
  • [FEATURE] Added custom email templates to dropdown selector for templates to whitelist
  • [FEATURE] Added logic to check email versus whitelist, where non-whitelisted templates are halted.
  • [BUGFIX] Empty whitelist was still sending email, resolved this by making !empty() check on template whitelist.
  • [REFACTOR] Small refactor for readability of class functions in plugin.
  • [BUGFIX] Message for resending was incorrectly displaying empty email adress. Message rewritten to "email was resent".

Version 3.0.0 - October 9th, 2019

  • [REFACTOR] DocBlocks and module composer require namespace changed
  • [FEATURE] Magento 2.3.3 support for forwarding and resending emails using the newly introduced \Magento\Framework\Mail\EmailMessageInterface. Fully backwards compatible to 2.2.x
  • [DOCS] Updated README, starting change logs
Comments
  • Bugfix/2.3fixes

    Bugfix/2.3fixes

    • Added db_schema, removed old install files
    • Removed rewrites, working with custom registry class
      • This fixes compatibility with for example MageMe Webforms module & Yireo Emailtester
    • Fixed resend and forward email with whitelist enabled
    • Some codesniffer fixes
    opened by rubenexp 3
  • Not compatible with 2.3

    Not compatible with 2.3

    Fatal error: Uncaught Error: Call to undefined method Zend\Mime\Message::getRawContent() in /data/web/magento2/vendor/experius/emailcatcher/Model/Emailcatcher.php:38 Stack trace: #0 /data/web/magento2/vendor/experius/emailcatcher/Plugin/Magento/Framework/Mail/TransportInterface.php(34): Experius\EmailCatcher\Model\Emailcatcher->saveMessage(Object(Magento\Framework\Mail\Message)) #1 /data/web/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Experius\EmailCatcher\Plugin\Magento\Framework\Mail\TransportInterface->aroundSendMessage(Object(Magento\Email\Model\Transport\Interceptor), Object(Closure)) #2 /data/web/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Email\Model\Transport\Interceptor->Magento\Framework\Interception{closure}() #3 /data/web/magento2/generated/code/Magento/Email/Model/Transport/Interceptor.php(26): Magento\Email\Model\Transport\Interceptor->___callPlugins('sendMessage', Array, Array) #4 /data/web/magento2/vendor/magento/module-sales/Model/Order/Email/Send in /data/web/magento2/vendor/experius/emailcatcher/Model/Emailcatcher.php on line 38

    opened by mikehenze 3
  • Fatal error: Uncaught Error: Call to undefined function Experius\EmailCatcher\Model\imap_utf8()

    Fatal error: Uncaught Error: Call to undefined function Experius\EmailCatcher\Model\imap_utf8()

    Getting following error

    Magento 2.3.4 PHP 7.2 Fatal error: Uncaught Error: Call to undefined function Experius\EmailCatcher\Model\imap_utf8() in /app/vendor/experius/module-emailcatcher/Model/Emailcatcher.php:97 Stack trace: #0 /app/vendor/experius/module-emailcatcher/Plugin/Magento/Framework/Mail/TransportInterface.php(89): Experius\EmailCatcher\Model\Emailcatcher->saveMessage(Object(Magento\Framework\Mail\EmailMessage\Interceptor)) #1 /app/vendor/experius/module-emailcatcher/Plugin/Magento/Framework/Mail/TransportInterface.php(63): Experius\EmailCatcher\Plugin\Magento\Framework\Mail\TransportInterface->saveMessage(Object(Experius\EmailCatcher\Rewrite\Magento\Email\Model\Transport\Interceptor)) #2 /app/vendor/magento/framework/Interception/Interceptor.php(135): Experius\EmailCatcher\Plugin\Magento\Framework\Mail\TransportInterface->aroundSendMessage(Object(Experius\EmailCatcher\Rewrite\Magento\Email\Model\Transport\Interceptor), Object(Closure)) #3 /app/vendor/magento/framework/Interception/Interceptor.php(153): Experius\EmailCatcher\Rewrite\Magento\Email\Model\Tran in /app/vendor/experius/module-emailcatcher/Model/Emailcatcher.php on line 97

    opened by kaushalsutharoc 2
  • Latest release is broke for new installations

    Latest release is broke for new installations

    Hi,

    if you try to install the module for the first time in a Magento store it will also execute the UpgradeSchema script and as there is no "to" column in the database you will receive an error.

    https://prnt.sc/p4v2pn

    opened by igor-imaginemage 2
  • Please make it compatible with 2.2

    Please make it compatible with 2.2

    PHP Fatal error: Class Experius\EmailCatcher\Mail\Transport contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Magento\Framework\Mail\TransportInterface::getMessage) in /data/web/magento2/vendor/experius/emailcatcher/Mail/Transport.php on line 16

    opened by mikehenze 2
  • Sorting error by user from

    Sorting error by user from

    When you want to order in the column from a error appears: "Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from ASC LIMIT 100' at line 1 SQL was: SELECT main_table.* FROM experius_emailcatcher AS main_table ORDER BY from ASC LIMIT 100" error is because the wordt from is reserved. it can be fixed by escaping the from. @dheesbeen

    opened by thokiller 1
  • Grid does not work in 2.3.1

    Grid does not work in 2.3.1

    Setup:

    • Magento Commerce 2.3.1
    • Email Catcher 2.2.1 installed via composer and enabled
    • No admin theme
    • DI compiled and static assets compiled

    Steps to recreate:

    • Fire an email by placing an order
    • Visit Email Catcher Grid

    Expected

    • Grid showing email

    Actual

    • Error where grid should be: "Not registered handle experius_emailcatcher_grid_data_source" https://www.dropbox.com/s/xhcbq8ugd2yanrg/Screenshot%202019-05-20%2012.06.25.png?dl=0
    opened by maderlock 1
  • Missing documentation

    Missing documentation

    Not sure how to view/preview emails, I will dig through the code and find out, but would be ideal if the features were outlined in the readme. Great module by the way, keep it up!

    opened by jefflenz 1
  • Class type of Mail/Transport.php should be Abstract Class

    Class type of Mail/Transport.php should be Abstract Class

    Hi Derrick,

    Found an issue when trying to use this module on Magento 2.2 (Commerce). This is resolved by the following commit. Since I do not have the appropriate access to the repository to create a branch/pull-request, I posted it here for now :-)

    commit 0dc083be70da688e63b0c18dc10aa43ca1d67461 Author: Boris van Katwijk [email protected] Date: Wed Sep 13 07:54:36 2017 +0000

    [BUGFIX] Made Mail/Transport.php an abstract class, since this was preventing dependency injection from compiling.
    
    Resolved -- PHP Fatal error:  Class Experius\EmailCatcher\Mail\Transport contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Magento\Framework\Mail\TransportInterface::getMessage) in /home/experius/domains/d4d.ftg.nl.staging22.experius.nl/vendor/experius/emailcatcher/Mail/Transport.php on line 16
    

    diff --git a/Mail/Transport.php b/Mail/Transport.php index 3656342..357d6bd 100644 --- a/Mail/Transport.php +++ b/Mail/Transport.php @@ -13,7 +13,7 @@

    namespace Experius\EmailCatcher\Mail;

    -class Transport extends \Zend_Mail_Transport_Sendmail implements \Magento\Framework\Mail\TransportInterface +abstract class Transport extends \Zend_Mail_Transport_Sendmail implements \Magento\Framework\Mail\TransportInterface {

     protected $_message;
    
    opened by borisvankatwijk 1
  • Na installatie error in Backend

    Na installatie error in Backend

    Na het navigeren naar System -> Tools -> Email catcher krijg ik de volgende foutmelding: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tablename_magento.experius_emailcatcher' doesn't exist, query was: SELECT COUNT(*) FROMexperius_emailcatcherASmain_table``

    De betreffende tabel is niet aangemaakt in de database. Alle stappen voor installatie module doorlopen inclusief setup:upgrade, cache:flush en verwijderen van pub/static/* var/di etc etc.

    edit: tabelnaam verwijderd uit foutmelding uit veiligheidsoverwegingen.

    opened by Tristan-N 1
  • bin/magento setup:di:compile errors

    bin/magento setup:di:compile errors

    Errors during compilation:

    Experius\EmailCatcher\Controller\Adminhtml\Emailcatcher\Index
    Incompatible argument type: Required type: \Magento\Backend\App\Action\Context. Actual type: \Magento\Framework\App\Action\Context; File: 
    vendor/experius/emailcatcher/Controller/Adminhtml/Emailcatcher/Index.php
    
    
    Experius\EmailCatcher\Controller\Adminhtml\Preview\Index
    Incompatible argument type: Required type: \Magento\Backend\App\Action\Context. Actual type: \Magento\Framework\App\Action\Context; File: 
    vendor/experius/emailcatcher/Controller/Adminhtml/Preview/Index.php
    
    opened by mtuinstra 1
  • ERROR: Run Cleanup

    ERROR: Run Cleanup

    When I attempted to RUN CLEANUP I received this error:

    Error: Call to undefined method Magento\Framework\Logger\LoggerProxy::addInfo() in vendor/experius/module-emailcatcher/Cron/Clean.php:74

    opened by bruce-gemberling 0
  • Cron issue on Magento Commerce 2.4.3-p1

    Cron issue on Magento Commerce 2.4.3-p1

    report.CRITICAL: Error when running a cron job {"exception":"[object] (RuntimeException(code: 0): Error when running a cron job at /vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:368, Error(code: 0): Call to undefined method Magento\Framework\Logger\LoggerProxy::addInfo() at /vendor/experius/module-emailcatcher/Cron/Clean.php:74)"} []

    opened by jlenzstaysafe 3
  • Magento 2.3.6 resend email

    Magento 2.3.6 resend email

    When resending email from email-catcher, my magento 2.3.6 sends an email to and from an utf-8 address for example "=?utf-8?Q?contact@ <website.com?= [email protected]>".

    bug 
    opened by Kroellie 1
  • Apply whitelist function in M 2.3.4 disables all e-mail communication

    Apply whitelist function in M 2.3.4 disables all e-mail communication

    Action:

    • Apply whitelist = Yes
    • Select e-mails to add to this whitelist

    Result: None of the e-mails is send

    Tested on: Magento ver. 2.3.4 Module version 3.1.3

    opened by pascalexperius 0
Releases(3.5.2)
Owner
Experius
Experius E-commere System Intergrator
Experius
Repman - PHP Repository Manager: packagist proxy and host for private packages

Repman - PHP Repository Manager Repman is a PHP repository manager. Main features: free and open source works as a proxy for packagist.org (speeds up

Repman 438 Jan 2, 2023
WordPress Packagist β€” manage your plugins with Composer

WordPress Packagist This is the repository for wpackagist.org which allows WordPress plugins and themes to be managed along with other dependencies us

Outlandish 648 Jan 1, 2023
Creates Packagist.org mirror site.

Packagist Mirror Creates your own packagist.org mirror site. Requirements PHP ^7.1.3 Installation Clone the repository Install dependencies: php compo

Indra Gunawan 32 Mar 30, 2020
πŸ‹πŸ“¦βœ‚οΈπŸ“‹πŸ“¦ Docker image of packagist mirror

Docker for Packagist Mirror This project allows you to easily create and update a mirror of the packagist having as dependency only the docker. It is

Webysther Nunes 28 Jan 20, 2022
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers

Magento 2 SMTP Extension - Gmail, G Suite, Amazon SES, Office 365, Mailgun, SendGrid, Mandrill and other SMTP servers. For Magento 2.0.x, 2.1.x, 2.2.x

MagePal :: Magento Extensions 303 Oct 7, 2022
Magento 2 Module Experius Page Not Found 404. This module saves all 404 url to a database table

Magento 2 Module Experius Page Not Found 404 This module saves all 404 urls to a database table. Adds an admin grid with 404s It includes a count so y

Experius 28 Dec 9, 2022
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
Add a logger to your Kirby3 website

A Website logger for Kirby3 Commercial Usage This plugin is free but if you use it in a commercial project please consider to buy me a ?? Installation

Michael Scheurich 13 Nov 27, 2022
Hook-logger-plugin - Debug WordPress action / filter hooks.

hook-logger-plugin Easily debug WordPress action / filter hooks, finding where actions are called from and understanding the flow of execution. This p

bruce aldridge 4 Feb 5, 2022
An actual logger for WordPress.

Wp-logger An actual logger for WordPress. This plugin does two things. It piggybacks on the internal php logger (via set_error_handler) and it creates

Jitesoft 2 Aug 15, 2022
A redacted PHP port of Underscore.js with additional functions and goodies – Available for Composer and Laravel

Underscore.php The PHP manipulation toolbelt First off : Underscore.php is not a PHP port of Underscore.js (well ok I mean it was at first). It's does

Emma Fabre 1.1k Dec 11, 2022
All the cryptocurrency icons available on coinmarketcap.com

Cryptocurrency Icons The official cryptocurrency icon pack for all your favourite cryptocurrencies. This repository contains all the cryptocurrency ic

Erik Thiart 130 Dec 29, 2022
Greyhole uses Samba to create a storage pool of all your available hard drives, and allows you to create redundant copies of the files you store.

Greyhole Greyhole is an application that uses Samba to create a storage pool of all your available hard drives (whatever their size, however they're c

Guillaume Boudreau 245 Dec 18, 2022
Library download currency rate and save in database, It's designed to be extended by any available data source.

Library download currency rate and save in database, It's designed to be extended by any available data source.

Flexmind. Krzysztof Bielecki 2 Oct 6, 2021
Traits used primarily in the v6 package but also available as a helper package for applications

Phalcon Traits This package contains traits with methods that are used for Phalcon v6 onward. It can also be useful to others that want short snippets

The Phalcon PHP Framework 5 Oct 7, 2022
Silverstripe-tinytidy - Control which styles are available in TinyMCE's style dropdown menu and what elements they can be applied to

TinyTidy for SilverStripe This module mainly serves as an example of how to customise the 'styles' dropdown menu in the TinyMCE editor to control whic

Jono Menz 30 Jul 30, 2020
πŸ“¦ "PHP type names" contains the list of constants for the available PHP data types.

PHP type names PHP type names ?? Description Simple library containing the list of constants for the available PHP data types. Use those constant type

β™š PH⑦ de Soriaβ„’β™› 4 Dec 15, 2022
World countries - available in multiple languages, in CSV, JSON, PHP, SQL and XML formats

Constantly updated lists of world countries and their associated alpha-2, alpha-3 and numeric country codes as defined by the ISO 3166 standard, available in CSV, JSON , PHP, SQL and XML formats, in multiple languages and with national flags included; also available are the ISO 3166-2 codes of provinces/ states associated with the countries

Stefan Gabos 1k Dec 29, 2022