[Flow] Unresolved dependency in TYPO3\SwiftMailer\Mailer
toco at aimeos.org
toco at aimeos.org
Fri Feb 20 15:43:52 CET 2015
Hi all
I've added the TYPO3.SwiftMailer package via composer and want to send an e-mail but I get a TYPO3\Flow\Object\Exception\UnresolvedDependenciesException instead when executing
$this->objectManager->get('\\TYPO3\\SwiftMailer\\Mailer');
The detailed description of the error is:
Missing required constructor argument $transport in class
TYPO3\SwiftMailer\Mailer. Note that constructor injection is only support
for objects of scope singleton (and this is not a singleton) – for
other scopes you must pass each required argument to the constructor
yourself.
The Objects.yaml file of the TYPO3.SwiftMailer package seems to contain the necessary configuration for resolving the dependency:
TYPO3\SwiftMailer\TransportInterface:
scope: prototype
factoryObjectName: TYPO3\SwiftMailer\TransportFactory
arguments:
1:
setting: TYPO3.SwiftMailer.transport.type
2:
setting: TYPO3.SwiftMailer.transport.options
3:
setting: TYPO3.SwiftMailer.transport.arguments
TYPO3\SwiftMailer\MailerInterface:
arguments:
1:
object: TYPO3\SwiftMailer\TransportInterface
What am I doing wrong or how it is supposed to work?
Thanks
Toco
More information about the Flow
mailing list