scopeConfig = $scopeConfig; } /** * Omit email sending depending on the system configuration setting * * @param TransportInterface $subject * @param \Closure $proceed * @return void * @throws MailException * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundSendMessage( TransportInterface $subject, \Closure $proceed ) { if (!$this->scopeConfig->isSetFlag('system/smtp/disable', ScopeInterface::SCOPE_STORE)) { $proceed(); } } }