magento2:怎樣在store email address新增郵件

You can create a new module and create an adminhtml folder in the etc folder. Here, create a system.xml and add the following code:html

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="trans_email" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
            <tab>general</tab>
            <group id="ident_custom3" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom Email 3</label>
                <field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Sender Email</label>
                    <validate>validate-email</validate>
                    <backend_model>Magento\Config\Model\Config\Backend\Email\Address</backend_model>
                </field>
                <field id="name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Sender Name</label>
                    <backend_model>Magento\Config\Model\Config\Backend\Email\Sender</backend_model>
                    <validate>validate-emailSender</validate>
                </field>
            </group>
        </section>
    </system>
</config>

This will add a Custom Email 3 section at Stores ->Configurations ->General ->Store Email Addresses.ide

相關文章
相關標籤/搜索