/** * @param MessageInterface $message * @param RecipientInterface $recipient * @return mixed|void */ protected function send(MessageInterface $message, RecipientInterface $recipient) { $pushoverMessage = new Message($this->token, $recipient->getInfo('pushover.user_key')); $pushoverMessage->setMessage($message->getSubject(), $message->getContent()); $pushoverMessage->setPriority(0, 60, 120); $pushoverMessage->send(); }
/** * {@inheritdoc} */ protected function send(MessageInterface $message, RecipientInterface $recipient) { $mail = clone $this->message; $mail->setTo($recipient->getInfo('email')); $mail->setSubject($message->getSubject()); $mail->setBody($message->getContent(), 'text/html'); $this->mailer->send($mail); }
protected function send(MessageInterface $message, RecipientInterface $recipient) { $oProwl = new Connector(); $oMsg = new Message(); try { $oProwl->setIsPostRequest(true); $oMsg->setPriority(0); $oProwl->setFilterCallback(function ($sText) { return $sText; }); $oMsg->addApiKey($recipient->getInfo('prowl_app.api_key')); $oMsg->setEvent($message->getSubject()); $oMsg->setDescription($message->getContent()); $oMsg->setApplication($this->appName); $oResponse = $oProwl->push($oMsg); if ($oResponse->isError()) { $this->errors[] = $oResponse->getErrorAsString(); } } catch (\InvalidArgumentException $oIAE) { $this->errors[] = $oIAE->getMessage(); } catch (\OutOfRangeException $oOORE) { $this->errors[] = $oOORE->getMessage(); } }
/** * {@inheritdoc} */ protected function sendOne(MessageInterface $message, RecipientInterface $recipient) { $mail = $message->getFormatted('swiftmailer'); $mail->setTo($recipient->getInfo('email')); $this->mailer->send($mail); }