Yireo - Developer training

Open main menu
EmailTester 2

Magento 2 Extension

EmailTester 2

Preview any transactional email in your Magento 2 backend

Already used in more than 832 shops
  • 100% open source and well-written
  • compliant with modern Magento standards
  • Free with no strings attached
  • Community collaboration via GitHub
FREE

Latest release: 1.6.23

Easy to use

Go to your Magento 2 backend, open up the EmailTester page and you are set. You can quickly select any transactional email and preview the email in your browser or send it to a specific inbox.

Dummy data

Most transactional emails in Magento require some kind of data: Customer details, product pricing, a valid quote. EmailTester makes it extremely use to pick a mail and fill it with the dummy data that you want to test.

Jisse Reitsma

This extension has been created by Jisse Reitsma

This extension has been written - with love - by Jisse Reitsma, founder of Yireo, three times Magento Master, partner of ExtDN, trainer and author. Jisse has been in the Magento ecosystem for many years and has created numerous Magento extensions. He also has been pushing better coding practices, like CI/CD, clean coding, coding standards and testing.

Packages & pricing

This extension is hosted on GitHub:
https://github.com/yireo/Yireo_EmailTester2

A vital addition to your Magento toolbox

100s developers have opted already for this amazing extension

EmailTester 2

Preview mails or send them

With EmailTester, you can select a Magento transactional email and preview it in the browser or send it to an emailaddress of your choice. The preview window allows you to refresh the page, while you work on improving the email layout in your editor.

Sending the email allows you to easily double-check whether the mail is displayed properly across multiple email clients.

EmailTester 2

Select dummy data easily

From within the form where you select the email to work with, you can also select a customer, a product and an order. From these data, EmailTester is able to derive all email variables needed to display an email with actual content. Inserting different customers or products is easily done. You never need to create a complete test-order again in the frontend to test email behavior.

EmailTester 2

Extensible as it should be

Our EmailTester picks up on any email that is built using the Magento transactional email system. Simply put, if you can override it in the Magento backend, you can test it with EmailTester.

Additionally, you create your own module to insert additional data into the EmailTester system, for instance if a third party extension adds a new entity to emails. We've made this really easy for developers to adopt: Just use the core event email_order_set_template_vars_before which is meant for this thing.



Tip: Use our Delete-Any-Order extension
to remove dummy orders, once you are done testing them.

Looking for a simple Getting Started guide?

  Download the Installation & User Guide (PDF)

Quick Start

Get up and running with your Yireo extension

Installation via composer URL

We recommend to install Magento 2 extensions via composer. See the Composer project for instructions on how to get composer up and running. Once composer is installed, use the following command to install our extension.

composer require yireo/magento2-emailtester2

This will make composer download the package from Packagist. After the composer installation has finished, use the following commands to enable the module within Magento:

bin/magento module:enable Yireo_EmailTester2
bin/magento cache:clean
bin/magento setup:upgrade

After these commands, the extension is ready for use in Magento. If you were already logged into the Magento Admin Panel, make sure to logout and log back in again, before proceeding. Do not forget to grab yourself a manual copy of our extension as a backup.

Manual installation

Please note that we strongly recommend using composer instead. If you bump into issues with this manual procedure, the first thing we need to ask is whether you have installed all dependencies, as mentioned in the composer.json file of this extension. If the composer.json file of this extension mentions requirements, you need to fulfill these requirements. This could involve checking for PHP requirements but also installing third party add-ons. Sounds difficult? Yes! That's why we can only recommend you to use composer. The manual installation does NOT make your life easier, even if you think it does.

Do use composer: It allows for dependency tracking and in the end, prevents breaking your site. However, in some cases, it might be required to do a non-composer installation. For these exceptional situations, download the module ZIP from our site (under the tab File Downloads). Next, create a folder with the following name and copy to the ZIP contents to it:

app/code/Yireo/EmailTester2

After the files have been uploaded, confirm that all files are in place. For instance, you should have a file like app/code/Yireo/EmailTester2/etc/module.xml. Next, use the following commands to enable the module within Magento:

bin/magento module:enable Yireo_EmailTester2
bin/magento cache:clean
bin/magento setup:upgrade

After these commands, the extension is ready for use in Magento. If you were already logged into the Magento Admin Panel, make sure to logout and log back in again, before proceeding. Do not forget to grab yourself a manual copy of our extension as a backup.

Downloads

Head over to the GitHub repository for downloads: https://github.com/yireo/Yireo_EmailTester2

Frequently Asked Questions

As of yet, Hyvä does not alter the way that email templates are styled. So yes, the EmailTester extension works together with Hyvä.

No, it is not. As a policy, all our Yireo software is unencrypted - we do not make use of technologies like ionCube or ZendOptimizer. All PHP-code is open source, but for commercial extensions the code is only given to paying customers.

You probably would like to know if this extension is working under a specific Magento version 2.X.Y. However, from a technical point of view, the question is wrong: The major Magento version 2.X.Y is not semantical but instead used for marketing purposes. It doesn't give any guarantees.

Instead, we maintain compatibility with the actual modules that lie underneath (like Magento_Catalog or the Magento Framework). And version management for these dependencies is handled via composer. We strongly advice you to rely on composer to answer the question whether our extension works under a specific Magento version. This is the only way to guarantee compatibility in a professional way.

Alternatively, study our CHANGELOG for details on the progress we made.

This extension is offered for free. Feel free to go the GitHub repository (see the link under Quick Start> Downloads) and open an Issue there. Please note that this is a voluntary open source project. The more helpful you are in describing the issue at hand, the more likely volunteers can come in to help you with the issue.

Our extension is developed to incorporate newer PHP features like type hinting, spaceship operators and terniary operators. For this, we recommend that PHP is running at least version PHP 7.1, but we recommend PHP 7.2. The actual requirements are always documented in our composer.json file.

It might be that the very fact that our composer.json file is mentioning a certain PHP requirement is conflicting with another Magento package that has defined a wrong dependency. If you are sure our extension meets the PHP requirements, you can skip this check using the --ignore-platform-reqs flag of composer:

composer require yireo/magento2-emailtester2 --ignore-platform-reqs

If you encounter an issue where an email override in your Magento Admin Panel doesn't parse the products output, while the original email does, note that this is not an issue with our extension but with newer versions of Magento. Specifically, since Magento 2.3.4, the following instruction is no longer allowed (specifically, the usage of an $order object in email templates stored in the database):

{{layout handle="sales_email_order_items" order=$order}}

Either you can migrate your email templates towards newer code that works (where EmailTester will simply support those new variables), or mark your template as legacy. Open up the database table email_template, locate the template_id of the email template in question and set the flag is_legacy to 1.

Yes, it does. The MagePlaza SMTP extension hooks into the Magento TransportBuilder and because of this, they simply work together. Actually, this is leading to one of our recommended test-setups: Install the MagePlaza SMTP extension (or some other similar extension), configure it to use the SMTP details of a testing email provider like mailtrap.io. Next, send the email via EmailTester and it should simply popup in the inbox of mailtrap.

Support

Getting support

If you run into problems, we are happy to help you out with the following resources:

  • Check FAQ on this page
  • See our Quick Start on this page
  • Open an Issue in the GitHub repository
    • Be as descriptive in your issue as possible
    • Do everything you can to troubleshoot the issue yourself
    • Understand that you are asking others to give up their free time

We usually respond in 24 hours but understand this is all done on a voluntary basis. Also note that we require you to collaborate together with us. Interpret errors as best as you can, before claiming our time. Free software does not automatically lead into free support as well.

Extensibility

EmailTester is written following standards like PSR-2, MEQP2, ECG and ExtDN.

You can hook into the core event email_order_set_template_vars_before or the custom event emailtester_variables. The second event allows you to inject more dummy content into your test emails.

Developer notes

We have shipped some Integration Tests with this extension, one of which is trying to preview any transactional email found by the extension. This might be slow. We don't care.

Also, this should allow you to determine whether EmailTester works together with transactional emails supplied by a third party extension. Let us know your feedback if you bump into issues here.

Unit testing

This extension ships with PHPUnit tests. The generic PHPUnit configuration in Magento 2 will pick up on these tests. To only test Yireo extensions, you can also run the following:

./vendor/bin/phpunit -c ./vendor/yireo/magento2-emailtester2/phpunit.xml.yireo

Integration testing

See the Magento document for the full procedure.

Supported Magento versions

  • 2.2 (2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.2.10)
  • 2.3 (2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.5-p1, 2.3.5-p2, 2.3.6, 2.3.7, 2.3.7-p1, 2.3.7-p2)
  • 2.4 (2.4.0, 2.4.1, 2.4.2, 2.4.2-p1, 2.4.2-p2, 2.4.3, 2.4.4, 2.4.5)
The supported PHP versions equal the versions supported by Magento itself

Requirement details

  • magento/framework: ^101.0.1|^101.1|^102.0|^103.0
  • magento/module-backend: ^100.0|^101.0|^102.0
  • magento/module-catalog: ^101.0|^102.0|^103.0|^104.0
  • magento/module-checkout: ^100.0
  • magento/module-config: ^100.0|^101.0
  • magento/module-customer: ^100.0|^101.0|^102.0|^103.0
  • magento/module-eav: ^100.0|^101.0|^102.0
  • magento/module-email: ^100.0|^101.0
  • magento/module-payment: ^100.0
  • magento/module-quote: ^100.0|^101.0
  • magento/module-sales: ^100.0|^101.0|^102.0|^103.0
  • magento/module-store: ^100.0|^101.0
  • magento/module-ui: ^101.0
  • ext-pcre: *
  • ext-json: *

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

[1.6.23] - 31 July 2022

Fixed
  • Bump

[1.6.22] - 31 July 2022

Fixed
  • Fix empty output in AlertGrid causing preg_replace error in Magento core

[1.6.21] - 31 July 2022

Fixed
  • Undefined flag with virtual orders (PR 2, @cloudsfactory)

[1.6.20] - 26 June 2022

Fixed
  • Copy shipping address from billing address when empty
  • Fix PHP 8.1 error with Magento AlertGrid (issue 35569)

[1.6.19] - 12 August 2021

Fixed
  • Prevent duplicate AJAX call when searching in modal popup

[1.6.18] - 17 May 2021

Fixed
  • Cleanup of DI code
  • Use General Contact as a fallback
  • Fix for "Send" not picking up on right variables anymore

[1.6.17] - 13 April 2021

Fixed
  • Prevent exception when order exists with no invoice

[1.6.16] - 2 March 2021

Fixed
  • Remove fake shipping ID because it will only generate an error

[1.6.15] - 1 March 2021

Fixed
  • Fixed missing shipping_id

[1.6.14] - 1 March 2021

Fixed
  • Fixed missing invoice_id and creditmemo_id just in case

[1.6.13] - 26 February 2021

Fixed
  • Remove yarn.lock
  • Fixed missing order_id
  • De-duplicate address code of both Order and OrderVars class

[1.6.12] - 19 December 2020

Fixed
  • Re-add setup_version for Magento 2.2 compatibility

[1.6.11] - 30 November 2020

Fixed
  • Use better method to inject form values in preview URL
Added
  • Add new customer note variables (2.4+)
  • Documented non-extension issue on outdated templates (FAQ)

[1.6.10] - 19 November 2020

Fixed
  • Make sure form values for product, order and customer are transferred to preview

[1.6.9] - 2 November 2020

Fixed
  • Change form IDs to become more unique to avoid conflicts with other extensions

[1.6.8] - 30 October 2020

Fixed
  • Change namespace of UiComponents buttons (preview) to avoid conflicts with other mixins

[1.6.7] - 28 July 2020

Fixed
  • Bump Magento 2.4 dependencies

[1.6.6] - 23 July 2020

Fixed
  • Remove all unneeded CSS from preview page

[1.6.5] - 21 July 2020

Fixed
  • Set order ID when creating dummy shipment
  • Upgrade tests to PHPUnit 8+ (Magento 2.4 compatible)

[1.6.4] - 30 June 2020

Added
  • Enhance integration tests for AJAX URLs
  • Allow for customer search based on full name
  • Allow column sorting in search popups for products, orders and customers
Removed
  • Remove setup_version because there is no setup
Fixed
  • Show messages on empty data right away on page
  • Additional compliance to PHP CodeSniffer

[1.6.3] - 3 June 2020

Added
  • Cleaned up configuration section
  • Fix CSS issue in header
  • Cleanup outdated jQuery autocomplete files

[1.6.2] - 19 May 2020

Added
  • Little footer in preview to show email subject

[1.6.1] - 12 May 2020

Fixed
  • Fix issue with admin keys for Preview page
  • Fix order_data not working, with empty greeting in order emails

[1.6.0] - 9 May 2020

Added
  • Open a tab when previewing
  • Reuse react_loader.html Knockout HTML
  • Initialize components via UiComponent XML

[1.5.0] - 21 April 2020

Added
  • Major rewrite of UiComponents using React to increase usability of searching for products, customers and orders

[1.4.3] - 10 December 2019

Fixed
  • Performance fix for checking if there are any products, customers or orders
  • Add default value 50 for limiting collections

[1.4.2] - 31 October 2019

[1.4.1] - 30 October 2019

Fixed
  • New CLI did not properly translate per Store View

[1.4.0] - 29 October 2019

Added
  • List all available transactional emails via the CLI (bin/magento yireo_emailtester2:list)
  • Send mails via the CLI (bin/magento yireo_emailtester2:send)

[1.3.3] - 28 October 2019

Fixed
  • Remove debugging statement

[1.3.2] - 28 October 2019

Fixed
  • Make sure "store_phone" (and other variables) switch per scope (Website) properly
  • Allow to set Sender in Store Configuration and/or form

[1.3.1] - 16 October 2019

Fixed
  • Fix issue with invoice items not showing in table
Added
  • Support for event email_shipment_set_template_vars_before`

[1.3.0] - 12 October 2019

Fixed
  • Fix issue with return value in M2.3.3
  • Remove PHP requirement in composer
  • Remember form values in forms
Added
  • Basic MFTF support

[1.2.2] - September 2019

Added
  • Initial MFTF navigation test

[1.2.1] - July 2019

Added
  • Add missing etc/config.xml
  • Move configuration to separate Yireo section

[1.2.0] - April 2019

Changed
  • Converted CHANGELOG to KeepAChangelog format
Added
  • Add Config class to phase out data-helper
  • Add suggestion of entering config values
  • Add some UI improvements for using autocomplete field
  • Add module version to main page

[1.1.9] - February 2019

Changed
  • Duplicate environment emulation in alertGrid caused "theme_dir" error

[1.1.8] - February 2019

Changed
  • Refactoring of Zend Mime to ZF3 causes failure

[1.1.7] - February 2019

Changed
  • Fix issue with changed event email_order_set_template_vars_before in M2.3

[1.1.6] - January 2019

Changed
  • Passing array to email_order_set_template_vars_before causes Fatal Error

[1.1.5] - January 2019

Changed
  • Add complete GitLab pipeline with live Magento checks
  • Try to load proper address before formatting it

[1.1.4] - November 2018

Changed
  • Rename "Email Tester" to "EmailTester" for marketplace

[1.1.3] - November 2018

Changed
  • Magento 2.3 compatibility

[1.1.2] - November 2018

Changed
  • Minor CSS improvements

[1.1.1] - November 2018

Changed
  • Prevent invalid order ID to throw unwanted exception
  • Fix untested issue in product exception

[1.1.0] - September 2018

Changed
  • Add AlertGrid support
  • Tighten composer dependencies

[1.0.5] - September 2018

Changed
  • Fix shipment items in shipment email
  • Add addresses to shipment emails
  • Testing with Magento 2.2.6 approved without any issues

[1.0.4] - August 2018

Changed
  • Supply extra variables
  • Fix checkout_payment_failed_template email
  • Add Integration Test to test all preview emails automatically

[1.0.3] - August 2018

Changed
  • Bugfix for backend template email override not working
  • Add proper CHANGELOG.md

[1.0.2] - August 2018

Changed
  • Add Trait to check for database statistics
  • Fix error with adminhtml mails that don't properly set area

[1.0.1] - July 2018

Changed
  • ExtDN compliance

[1.0.0] - June 2018

Changed
  • Rewrite manual form into UiComponent form
  • Magento ECG compliance
  • Add unit testing and integration testing
  • Only compatible with Magento 2.2 and up
Removed
  • Compatibility with 2.1 in favor of ViewModels

[0.2.12] - May 2018

Changed
  • Remove unneeded composer dev requirements

[0.2.11] - January 2018

Changed
  • Fix notice when no creditmemos are available

[0.2.10] - December 2017

Changed
  • Change title in backend menu

[0.2.9] - November 2017

Changed
  • Code beautification

[0.2.8] - October 2017

Changed
  • Fix fatal error when Store View is incorrectly configured

[0.2.7] - September 2017

Changed
  • Add basic Jasmine JS testing

[0.2.6] - August 2017

Changed
  • Code cleanup

[0.2.5] - August 2017

Changed
  • Fix compilation issues due to 1 PHP notice

[0.2.4] - August 2017

Changed
  • EQP compliance
  • Raise PHP requirement to PHP7

[0.2.3] - May 2017

Changed
  • Remove adminhtml XML layout handles which cause wrong CSS

[0.2.2] - April 2017

Changed
  • Add events email_order_set_template_vars_before and emailtester_variables

[0.2.1] - April 2017

Changed
  • Version bump

[0.2.0] - February 2017

Changed
  • Added Store View filter
  • Move all files from source/ to package root (M2.1 compliance)

[0.1.5] - November 2016

Changed
  • Fix for loading theme-specific templates

[0.1.4] - September 2016

Changed
  • Code compliance

[0.1.3] - August 2016

Changed
  • Load entities only by catching exceptions

[0.1.2] - August 2016

Changed
  • Fix DI compilation issue with wrong $context usage
  • Implement mail functionality

[0.1.1] - August 2016

Changed
  • Packaging issue

[0.1.0] - July 2016

Changed
  • Initial public release
  • Working edition with main variables
  • Some unit tests
  • Pending documentation
ExtDN

We are a proud member of ExtDN

ExtDN forms a network of Magento extension developers, that strive for a better extension quality - both on a technical level and from an end-users point of view. With industry leaders like Fooman and aHeadworks, ExtDN lifts up the Magento extension space to a new level. And Yireo is proud to be part of this.

Do not miss out on what we say

This will be the most interesting spam you've ever read

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.

Sign up for the Yireo newsletter

Training

Extensions

GitHub organizations

Legal information

Other Yireo sites

Get Social

About Yireo