Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Model/Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,12 @@ public function sendMessage()
throw new \Magento\Framework\Exception\MailException(new \Magento\Framework\Phrase($e->getMessage()), $e);
}
}

/**
* @inheritdoc
*/
public function getMessage()
{
return $this->_message;
}
}
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "codepeak/magento2-mailtrap",
"description": "Enable mail testing through Mailtrap.io",
"version": "1.1.0",
"license": "proprietary",
"authors": [
{
Expand All @@ -9,7 +10,9 @@
}
],
"minimum-stability": "dev",
"require": {},
"require": {
"magento/module-email": "*"
},
"autoload": {
"files": [
"registration.php"
Expand Down
2 changes: 1 addition & 1 deletion etc/di.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="\Magento\Framework\Mail\Transport" type="Codepeak\Mailtrap\Model\Transport"/>
<preference for="Magento\Framework\Mail\TransportInterface" type="Codepeak\Mailtrap\Model\Transport"/>
</config>
6 changes: 5 additions & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Codepeak_Mailtrap" setup_version="1.0.0"/>
<module name="Codepeak_Mailtrap" setup_version="1.1.0">
<sequence>
<module name="Magento_Email"/>
</sequence>
</module>
</config>