/**
  * @param Event $event
  */
 public function send(Event $event)
 {
     $body = '—' . PHP_EOL . 'This email has been sent automatically.';
     /** @var SendEvent $event */
     if (null !== $event->getBody()) {
         $body = 'Check out this github repository update:' . PHP_EOL . PHP_EOL . $event->getBody() . PHP_EOL . PHP_EOL . $body;
     }
     $message = Swift_Message::newInstance($event->getSummary())->setFrom(array('*****@*****.**' => 'wooshell notify'))->setTo(array('*****@*****.**' => 'A name'))->setBody($body);
     $this->mailer->send($message);
 }
示例#2
0
 /**
  * @param Event $event
  */
 public function send(Event $event)
 {
     /** @var SendEvent $event */
     exec(sprintf('%s "%s" "%s"', $this->binary, $event->getSummary(), $event->getBody()));
 }