Skip to content

Commit a7b17f0

Browse files
committed
Add support for Magento 2.2
1 parent 038db55 commit a7b17f0

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"magento/framework": "100.0.*|100.1.*|100.2.*"
1616
},
1717
"type": "magento2-module",
18-
"version": "1.4.6",
18+
"version": "1.5.0",
1919
"license": [
2020
"OSL-3.0",
2121
"AFL-3.0"

etc/adminhtml/system.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
<label>Set From</label>
8383
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
8484
<comment>Use Return-Path email address for the From address rather than the Magento supplied value.</comment>
85+
<depends>
86+
<field id="*/*/active">1</field>
87+
</depends>
8588
</field>
8689
<field id="set_return_path" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1" showInStore="1">
8790
<label>Set Return-Path</label>

etc/di.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9+
<!-- For Magento < 2.2 -->
910
<preference for="\Magento\Framework\Mail\Transport" type="MagePal\GmailSmtpApp\Model\Transport"/>
1011
<type name="MagePal\GmailSmtpApp\Model\Transport">
1112
<plugin sortOrder="100" name="magePalGmailSmtpAppTransport" type="MagePal\GmailSmtpApp\Plugin\Mail\TransportPlugin"/>
1213
</type>
14+
15+
<!-- For Magento Eq 2.2 -->
16+
<type name="\Magento\Framework\Mail\TransportInterface">
17+
<plugin sortOrder="100" name="magePalGmailSmtpAppTransportInterface" type="MagePal\GmailSmtpApp\Plugin\Mail\TransportPlugin"/>
18+
</type>
1319
</config>
1420

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="MagePal_GmailSmtpApp" setup_version="1.4.6">
9+
<module name="MagePal_GmailSmtpApp" setup_version="1.5.0">
1010
<sequence>
1111
<module name="Magento_Email"/>
1212
</sequence>

0 commit comments

Comments
 (0)