Ejemplo n.º 1
0
 /**
  * Sends an iMIP message by email.
  *
  * @param string $originator
  * @param array $recipients
  * @param Sabre_VObject_Component $vObject
  * @param string $principal Principal url
  * @return void
  */
 protected function iMIPMessage($originator, array $recipients, Sabre_VObject_Component $vObject, $principal)
 {
     if (!$this->imipHandler) {
         throw new Sabre_DAV_Exception_NotImplemented('No iMIP handler is setup on this server.');
     }
     $this->imipHandler->sendMessage($originator, $recipients, $vObject, $principal);
 }
Ejemplo n.º 2
0
 /**
  * Sends an iMIP message by email.
  *
  * This method must return an array with status codes per recipient.
  * This should look something like:
  *
  * array(
  *    '*****@*****.**' => '2.0;Success'
  * )
  *
  * Formatting for this status code can be found at:
  * https://tools.ietf.org/html/rfc5545#section-3.8.8.3
  *
  * A list of valid status codes can be found at:
  * https://tools.ietf.org/html/rfc5546#section-3.6
  *
  * @param string $originator
  * @param array $recipients
  * @param Sabre\VObject\Component $vObject
  * @return array
  */
 protected function iMIPMessage($originator, array $recipients, VObject\Component $vObject, $principal)
 {
     if (!$this->imipHandler) {
         $resultStatus = '5.2;This server does not support this operation';
     } else {
         $this->imipHandler->sendMessage($originator, $recipients, $vObject, $principal);
         $resultStatus = '2.0;Success';
     }
     $result = array();
     foreach ($recipients as $recipient) {
         $result[$recipient] = $resultStatus;
     }
     return $result;
 }