symfony / swiftmailer-bundle

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

Throwing Exception for bad URL formats #273

Closed maitre-hibou closed 5 years ago

maitre-hibou commented 5 years ago

Hello there,

Description : When supplying a wrong URL format in the MAILER_URL environment variable, Swiftmailer Transport component is initialized with bundle default configuration values. Therefore, when trying to send emails, a "silent" error is triggered with the following message : Exception occurred while flushing email queue: Connection could not be established with host localhost [Address not available #99].

Changes made : This PR now throws an InvalidArgumentException if supplied URL is not parseable by PHP's parse_url method.

fabpot commented 5 years ago

Thank you @maitre-hibou.