(non-PHPdoc).

@see Azine\EmailBundle\Services.NotifierServiceInterface::sendNotifications()
326876
public function sendNotifications(array &$failedAddresses)
    {
        // get all recipientIds with pending notifications in the database, that are due to be sent
        $recipientIds = $this->getNotificationRecipientIds();

        // get vars that are the same for all recipients of this notification-mail-batch
        $params = $this->getVarsForNotificationsEmail();

        $notificationsTemplate = $this->configParameter[AzineEmailExtension::TEMPLATES.'_'.AzineEmailExtension::NOTIFICATIONS_TEMPLATE];

        $sentCount = 0;
        foreach ($recipientIds as $recipientId) {
            // send the mail for this recipient
            $failedAddress = $this->sendNotificationsFor($recipientId, $notificationsTemplate, $params);
            if (null !== $failedAddress && strlen($failedAddress) > 0) {
                $failedAddresses[] = $failedAddress;
            } else {
                ++$sentCount;
            }
        }

        return $sentCount;
    }
920487
public function addNotifiableNotification(NotifiableNotification $notifiableNotification)
    {
        if (!$this->notifiableNotifications->contains($notifiableNotification)) {
            $this->notifiableNotifications[] = $notifiableNotification;
            $notifiableNotification->setNotifiableEntity($this);
        }

        return $this;
    }
1274147
public function send($notifiable, Notification $notification)
    {
        if (! $userIds = $notifiable->routeNotificationFor('OneSignal', $notification)) {
            return;
        }

        /** @var ResponseInterface $response */
        $response = $this->oneSignal->sendNotificationCustom(
            $this->payload($notifiable, $notification, $userIds)
        );

        if ($response->getStatusCode() !== 200) {
            throw CouldNotSendNotification::serviceRespondedWithAnError($response);
        }

        return $response;
    }
1270895
public function send($notifiable, Notification $notification)
    {
        $tokens = (array) $notifiable->routeNotificationFor('gcm', $notification);
        if (empty($tokens)) {
            return;
        }

        $message = $notification->toGcm($notifiable);
        if (! $message) {
            return;
        }

        $packet = $this->getPacket($tokens, $message);

        try {
            $response = $this->client->send($packet);
        } catch (Exception $exception) {
            throw SendingFailed::create($exception);
        }

        if (! $response->getFailureCount() == 0) {
            $this->handleFailedNotifications($notifiable, $notification, $response);
        }
    }
595898
public function send(string $notifiable, Notification $notification)
    {
        $channelResult = $notification->toMail($notifiable);
        $messages = is_array($channelResult) ? $channelResult : [$channelResult];

        foreach ($messages as $message) {
            if (! $message instanceof Message) {
                throw new \Exception("Message needs to be an instance of craft\mail\Message");
            }

            $message->send();
        }
    }
187508
protected function listenNotificationsEvents(array $notification)
    {
        $events = Arr::get($notification, 'event');

        if($events === null && isset($notification['classname'])) {
            $events = app()->make($notification['classname'])->getEvents();
        }

        foreach ((array) $events as $event) {
            $this->runNotificationListener($event, $notification);
        }
    }
935054
public function addNotifications(array $notifications)
    {
        foreach ($notifications as $notification) {
            if (in_array($notification, $this->notifications, true)) {
                continue;
            }

            $this->addNotification($notification);
        }
    }
320318
async def send_notification(self, method, args=()):
        ''''''
        message = self.connection.send_notification(Notification(method, args))
        await self._send_message(message)
320603
public function setMessage(NotificationInterface $notification, $message, $flush = false)
    {
        $notification->setMessage($message);
        $this->flush($flush);

        $event = new NotificationEvent($notification);
        $this->dispatcher->dispatch(MgiletNotificationEvents::MODIFIED, $event);

        return $notification;
    }
374580
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toMessagebird($notifiable);

        if (is_string($message)) {
            $message = MessagebirdMessage::create($message);
        }

        if ($to = $notifiable->routeNotificationFor('messagebird')) {
            $message->setRecipients($to);
        }

        $this->client->send($message);
    }
351141
protected function queueNotification($notifiables, $notification)
    {
        if (version_compare($this->app->version(), '5.2', '<')) {
            $this->app->make(Bus::class)->dispatch(
                (new SendQueuedNotifications($notifiables, $notification))
                    ->onQueue($notification->queue)
                    ->delay($notification->delay)
            );
        } else {
            $this->app->make(Bus::class)->dispatch(
                (new SendQueuedNotifications($notifiables, $notification))
                    ->onConnection($notification->connection)
                    ->onQueue($notification->queue)
                    ->delay($notification->delay)
            );
        }
    }
1314883
public function sendNotification()
    {
        if (($from = self::config()->get('mail_sender')) && empty($from)) {
            $from = Config::inst()->get('Email', 'admin_email');
        }

        if (($to = self::config()->get('mail_receiver')) && empty($to)) {
            $to = Config::inst()->get('Email', 'admin_email');
        }

        $email = new Email();
        $email->setSubject(_t(
            'NotificationMail.TITLE',
            'Nieuwe reservering voor {event}',
            null, array('event' => $this->Event()->Title)
        ));

        $email->setFrom($from);
        $email->setTo($to);
        $email->setTemplate('NotificationMail');
        $email->populateTemplate($this);
        $this->extend('updateNotificationMail', $email);
        return $email->send();
    }
60336
public function sendNotification($order)
    {
        // Deal with customer email
        if ($order->Email && ($this->SendNotificationTo == 'Customer' || $this->SendNotificationTo == "Both")) {
            if ($this->CustomSubject) {
                $subject = $this->CustomSubject;
            } else {
                $subject = _t('Orders.Order', 'Order') . " {$order->FullRef} {$order->Status}";
            }

            $email = Email::create()
                ->setSubject($subject)
                ->setTo($order->Email)
                ->setHTMLTemplate("\\SilverCommerce\\OrdersAdmin\\Email\\OrderNotificationEmail_Customer")
                ->setData([
                    "Order" => $order,
                    "SiteConfig" => $this->Parent(),
                    "Notification" => $this
                ]);

            if ($this->FromEmail) {
                $email->setFrom($this->FromEmail);
            }
            
            $this->extend("augmentEmailCustomer", $email, $order);
            
            $email->send();
        }

        // Deal with vendor email
        if ($this->VendorEmail && ($this->SendNotificationTo == 'Vendor' || $this->SendNotificationTo == "Both")) {
            if ($this->CustomSubject) {
                $subject = $this->CustomSubject;
            } else {
                $subject = _t('Orders.Order', 'Order') . " {$order->FullRef} {$order->Status}";
            }
            
            $email = Email::create()
                ->setSubject($subject)
                ->setTo($this->VendorEmail)
                ->setHTMLTemplate("\\SilverCommerce\\OrdersAdmin\\Email\\OrderNotificationEmail_Vendor")
                ->setData([
                    "Order" => $order,
                    "Notification" => $this
                ]);

            if ($this->FromEmail) {
                $email->setFrom($this->FromEmail);
            }
            
            $this->extend("augmentEmailVendor", $email, $order);
            
            $email->send();
        }
        
        $this->extend("augmentSend", $order);
    }
671371
public function sendNow($notifiables, $notification, array $channels = null)
    {
        $notifiables = $this->formatNotifiables($notifiables);

        $original = clone $notification;

        foreach ($notifiables as $notifiable) {
            if (empty($viaChannels = $channels ?: $notification->via($notifiable))) {
                continue;
            }

            $notificationId = Uuid::uuid4()->toString();

            foreach ((array) $viaChannels as $channel) {
                $this->sendToNotifiable($notifiable, $notificationId, clone $original, $channel);
            }
        }
    }
830855
static function notify( $message, $type )
    {
        $nots = State::get( 'notifications' );
        array_push( $nots, array( 'message' => $message, 'type' => $type ) );
        State::set( 'notifications', $nots );
    }
99759
public function send($notifiables, $notifications)
    {
        if (!is_array($notifiables)) {
            $notifiables = [$notifiables];
        }
        if (!is_array($notifications)) {
            $notifications = [$notifications];
        }
        foreach ($notifiables as $notifiable) {
            $channels = array_intersect($notifiable->viaChannels(), array_keys($this->getChannels(true)));
            foreach ($notifications as $notification) {
                if (!$notifiable->shouldReceiveNotification($notification)) {
                    continue;
                }
                $notification->id = StringHelper::ObjectId();
                $channels = array_intersect($channels, $notification->broadcastOn());
                foreach ($channels as $channel) {
                    $this->get($channel)->send($notifiable, $notification);
                }
            }
        }
    }
144725
public function sendNotify($applicationName, $notificationName, $notificationTitle, $notificationText, $options = array())
    {
        $notification_options = $options;
        $notification_options['text'] = $notificationText;
        $register = new RegisterRequest($applicationName);
        $register->addNotification($notificationName);
        $notify = new NotificationRequest($applicationName, $notificationName, $notificationTitle, $notification_options);
        return $this->notifyOrRegister($notify, $register)->getStatus();
    }