src/Viserio/Component/Mail/MailManager.php
protected function create(array $config, string $method, string $errorMessage): MailerContract
    {
        if (isset($this->extensions[$config['name']])) {
            return $this->callCustomCreator($config['name'], $config);
        }

        if ($this->transportFactory->hasTransport($config['driver'])) {
            return $this->createMailer(
                $this->transportFactory->getTransport(
                    $config['driver'],
                    $config['transporter'] ?? []
                ),
                $config
            );
        }

        throw new InvalidArgumentException(\sprintf('Mailer [%s] is not supported.', $config['name']));
    }
protected function create(array $config, string $method, string $errorMessage): MailerContract
    {
        if (isset($this->extensions[$config['name']])) {
            return $this->callCustomCreator($config['name'], $config);
        }

        if ($this->transportFactory->hasTransport($config['driver'])) {
            return $this->createMailer(
                $this->transportFactory->getTransport(
                    $config['driver'],
                    $config['transporter'] ?? []
                ),
                $config
            );
        }

        throw new InvalidArgumentException(\sprintf('Mailer [%s] is not supported.', $config['name']));
    }
{@inheritdoc}

@throws \Viserio\Component\Contract\Manager\Exception\InvalidArgumentException

@return \Viserio\Component\Contract\Mail\Mailer|\Viserio\Component\Contract\Mail\QueueMailer