You are browsing documentation for version 5.0 of OroCommerce, OroCRM, and OroPlatform, maintained until August 2024 and supported until March 2026. See version 5.1 (the latest LTS version) of the Oro documentation for information on latest features.

See our Release Process documentation for more information on the currently supported and upcoming releases.


On top on Symfony’s \Symfony\Component\Mailer\Event\MessageEvent, OroEmailBundle introduces \Oro\Bundle\EmailBundle\Event\BeforeMessageEvent. Both events allow modifying an email message and an envelope, and the difference between them is in the point at which they do that.

BeforeMessageEvent is dispatched before MessageEvent and from the \Oro\Bundle\EmailBundle\Mailer\Transport\Transport wrapper before an email message is passed to the Symfony Mailer transport (e.g., Symfony\Component\Mailer\Transport\Transports) that detects which mailer transport should be used based on the X-Transport header.