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.
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'sparse_url
method.