try { $transportConfig =
trim($this->configService->
getString('core.mailerSettings.emailAgent'
));
if ($transportConfig === ''
) { return $this->
createTransportUsingDSN($dsn);
} } catch (DriverException
) { // We don't have a database connection right now
return $this->
createTransportUsingDSN($dsn);
} return new MailerTransportDecorator( $this->
create(),
$this->attachmentsBuilder,
$this->filesystem,
$this->documentRepository
);
} public function createTransportUsingDSN(string
$dsn): MailerTransportDecorator
{ return new MailerTransportDecorator( $this->envBasedTransport->
fromString($dsn),