Open Erikvv opened 6 years ago
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
I updated my project, mostly zend-servicemanager and zend-eventmanager from v2 to v3, and now the From header is missing.
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.