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> class: \Monolog\Handler\SwiftMailerHandler<br> arguments:<br> mailer:<br> class: Swift_Mailer<br> transport:<br> class: Swift_SmtpTransport<br> host: '192.168.0.1'<br> port: 25<br> message: 'Example'<br> 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