Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-email
Model
Mail
TransportInterfacePlugin.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Email\Model\Mail
;
7
8
use
Magento\Framework\App\Config\ScopeConfigInterface
;
9
use
Magento\Framework\Exception\MailException
;
10
use
Magento\Framework\Mail\TransportInterface
;
11
use
Magento\Store\Model\ScopeInterface
;
12
18
class
TransportInterfacePlugin
19
{
23
private
$scopeConfig;
24
28
public
function
__construct
(
29
ScopeConfigInterface
$scopeConfig
30
) {
31
$this->scopeConfig = $scopeConfig;
32
}
33
43
public
function
aroundSendMessage
(
44
TransportInterface
$subject,
45
\Closure $proceed
46
) {
47
if
(!$this->scopeConfig->isSetFlag(
'system/smtp/disable'
,
ScopeInterface::SCOPE_STORE
)) {
48
$proceed();
49
}
50
}
51
}
Magento\Email\Model\Mail\TransportInterfacePlugin\__construct
__construct(ScopeConfigInterface $scopeConfig)
Definition:
TransportInterfacePlugin.php:28
Magento\Store\Model\ScopeInterface\SCOPE_STORE
const SCOPE_STORE
Definition:
ScopeInterface.php:21
Magento\Framework\Exception\MailException
Definition:
MailException.php:14
Magento\Email\Model\Mail
Definition:
TransportInterfacePlugin.php:6
Magento\Store\Model\ScopeInterface
Definition:
ScopeInterface.php:12
Magento\Framework\Mail\TransportInterface
Definition:
TransportInterface.php:14
Magento\Email\Model\Mail\TransportInterfacePlugin\aroundSendMessage
aroundSendMessage(TransportInterface $subject, \Closure $proceed)
Definition:
TransportInterfacePlugin.php:43
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15
Magento\Email\Model\Mail\TransportInterfacePlugin
Definition:
TransportInterfacePlugin.php:18