How do you hide a default magento 2 config section in the backend (Admin Panel)? For example I want to hide the "Mail Sending Settings" section located in Stores->Configuration->Advanced->System
This is what I tried so far but it's not working:
composer.json
{
"name": "vendor/module_name",
"description": "SMTP Extension for Magento 2 to help the configuration of the SMTP (Simple Mail Transfer Protocol) server.",
"type": "magento2-module",
"version": "1.0.0",
"require": {
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
"magento/framework": "100.1.*",
"magento/magento-config": "100.1.*"
},
"license": [
"proprietary"
],
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"Vendor\\Module_Name\\": ""
},
"files": [
"registration.php"
]
}
}
registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'vendor_module_name',
__DIR__
);
etc/system.xml
<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="system">
<group id="smtp" showInDefault="0" showInWebsite="0" showInStore="0">
</group>
</section>
</system>
</config>
etc/module.xml
<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="vendor_module_name" setup_version="1.0.0">
</module>
</config>
PS: My cache is disabled and my Magento 2 installation is in developer mode.