/** * @param string $message * @return bool */ public function consume($message) { $emailTo = $message['to']; $body = $message['body']; $emailFrom = $this->configProvider->getConfig()['defaultEmail']; $nameFrom = $this->configProvider->getConfig()['defaultName']; $this->sender->send($emailTo, 'someSubject', $body, $nameFrom, $emailFrom, $body); }
/** * Provide application configuration. * * @return array */ public function getConfig() { $provider = new ConfigProvider(); return $provider->getConfig(); }