DefaultHeaders plugin no longer working after ZF3 upgrade
I updated my project, mostly zend-servicemanager and zend-eventmanager from v2 to v3, and now the From header is missing.
Zend\Mail\Transport\Smtp transport expects either a Sender or at least one From address in the Message; none provided
MtMail version is the same (1.5.1). If i set the header manually it works.
I'm not sure whats going on. Will investigate a bit more.
Classes Composer and DefaultHeaders are using different instances of the EventManager
The first instance Composer makes for itself in its factory at https://github.com/mtymek/MtMail/blob/master/src/Factory/ComposerServiceFactory.php#L41
Then after this the ServiceManager calls Composer::setEventManager() because of EventManagerAwareInterface
I think the best solution is to remove EventManagerAwareInterface and remove setEventManager
This has the same root cause as https://github.com/mtymek/MtMail/issues/36