Swiftmailer configuration cannot be set
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2915422. --> Reported by: [grahl](https://www.drupal.org/user/146040) >>> <p>Several handlers work fine for me but the configuration for SwiftMailer presents an obstacle I've yet to solve. Local mail delivery works fine but when I want to define the mailer arguments I'm unable to configure it correctly.</p> <pre>monolog.handler.myhandler:<br>&nbsp; class: \Monolog\Handler\SwiftMailerHandler<br>&nbsp; arguments:<br>&nbsp;&nbsp;&nbsp; mailer:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class: Swift_Mailer<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; transport:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class: Swift_SmtpTransport<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host: '192.168.0.1'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port: 25<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message: 'Example'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; level: DEBUG</pre><p>I've tried various variants of this, such as absolute class names like \Swift_Mailer and or the arguments wrapped in array instead of as named attributes but the best I've received until now is mailer being null instead of Swift_Mailer. I think this is a bug in terms of how attributes can be defined here but am leaving it as support request for now, should this be a user error.</p> <p>The only related issue I've found on this topic is <a href="https://github.com/theorchard/monolog-cascade/issues/59">https://github.com/theorchard/monolog-cascade/issues/59</a> </p>
issue