symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

Integrate mailer_url for tierce library #217

Closed Nightbr closed 4 years ago

Nightbr commented 6 years ago

Hello,

I would like to handle MAILER_URL with Mailjet library such as mailjet://apikey:apisecret@api.mailjet.com/v3.

I looked into https://github.com/symfony/swiftmailer-bundle/blob/master/DependencyInjection/SwiftmailerTransportFactory.php and it seems that we only can use smtp, sendmail, gmail or null.

My question is : is it a way to handle custom url bind on custom SwiftMailer transport in swiftmailer-bundle or we have to handle this into our bundle and use classic configuration transport: mailjet?

Thanks in advance!

Related: https://github.com/mailjet/mailjetBundle/issues/7

kojidev commented 5 years ago

You can use a service id in transport field, but you should have no env vars in other config fields, so you have to put credentials directly into your transport service which is a hachish workaround.

fabpot commented 4 years ago

This has been implemented in Symfony Mailer.