We’re sorry, an error has occurred while generating this email

Today, I was dealing with the following error message on one of our Magento2 production environment.

After spending 2 hours trying to find the source of the problem in our custom modules, I was able to fix the issue by disabling the core module Magento_SampleData.

What is this module for? This module gives you different sample data ( CMS, Catalog, Customers ) which is useful during development and testing phase. For your production environment it is not necessary and also not recommended to have it installed, as you can read here.

2 thoughts on “We’re sorry, an error has occurred while generating this email”

Leave a Reply

Your email address will not be published. Required fields are marked *