public static function configTransport($key, $config = null)
    {
        deprecationWarning('Email::configTransport() is deprecated. Use TransportFactory::setConfig() or TransportFactory::getConfig() instead.');

        if ($config === null && is_string($key)) {
            return TransportFactory::getConfig($key);
        }
        if ($config === null && is_array($key)) {
            TransportFactory::setConfig($key);

            return null;
        }

        TransportFactory::setConfig($key, $config);
    }
public static function configTransport($key, $config = null)
    {
        deprecationWarning('Email::configTransport() is deprecated. Use TransportFactory::setConfig() or TransportFactory::getConfig() instead.');

        if ($config === null && is_string($key)) {
            return TransportFactory::getConfig($key);
        }
        if ($config === null && is_array($key)) {
            TransportFactory::setConfig($key);

            return null;
        }

        TransportFactory::setConfig($key, $config);
    }
public static function configTransport ( $ key , $ config = null ) { deprecationWarning ( 'Email::configTransport() is deprecated. Use TransportFactory::setConfig() or TransportFactory::getConfig() instead.' ) ; if ( $ config === null && is_string ( $ key ) ) { return TransportFactory :: getConfig ( $ key ) ; } if ( $ config === null && is_array ( $ key ) ) { TransportFactory :: setConfig ( $ key ) ; return null ; } TransportFactory :: setConfig ( $ key , $ config ) ; }
Add or read transport configuration.

Use this method to define transports to use in delivery profiles.
Once defined you cannot edit the configurations, and must use
Email::dropTransport() to flush the configuration first.

When using an array of configuration data a new transport
will be constructed for each message sent. When using a Closure, the
closure will be evaluated for each message.

The `className` is used to define the class to use for a transport.
It can either be a short name, or a fully qualified classname

@deprecated 3.4.0 Use TransportFactory::setConfig()/getConfig() instead.
@param string|array $key The configuration name to read/write. Or
an array of multiple transports to set.
@param array|\Cake\Mailer\AbstractTransport|null $config Either an array of configuration
data, or a transport instance.
@return array|null Either null when setting or an array of data when reading.
@throws \BadMethodCallException When modifying an existing configuration.
Add or read transport configuration .