public static function setDefaultGateway($name)
    {
        if (self::__getClassPath($name)) {
            Symphony::Configuration()->set('default_gateway', $name, 'Email');
            Symphony::Configuration()->write();
        } else {
            throw new EmailGatewayException(__('This gateway can not be found. Can not save as default.'));
        }
    }