/** * Send a message to the shop managers. * * @param string $messageCode * @param array $messageParameters an array of (name => value) parameters that will be available in the message. */ public function sendEmailToShopManagers($messageCode, $messageParameters = []) { $storeName = ConfigQuery::getStoreName(); // Build the list of email recipients $recipients = ConfigQuery::getNotificationEmailsList(); $to = []; foreach ($recipients as $recipient) { $to[$recipient] = $storeName; } $this->sendEmailMessage($messageCode, [ConfigQuery::getStoreEmail() => $storeName], $to, $messageParameters); }