Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
TransportInterfacePlugin.php
Go to the documentation of this file.
1 <?php
7 
12 
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 }
aroundSendMessage(TransportInterface $subject, \Closure $proceed)