context->addViolation($e->getMessage() ?: 'mautic.email.dsn.invalid_dsn'); return; } try { $this->transportFactory->fromDsnObject($dsn); } catch (UnsupportedSchemeException $e) { $this->context->addViolation($e->getMessage() ?: 'mautic.email.dsn.unsupported_scheme'); } catch (ExceptionInterface $e) { $this->context->addViolation($e->getMessage() ?: 'mautic.email.dsn.invalid_dsn'); } } }