示例#1
0
 /**
  * Handle the event
  *
  * @param League\Event\EventInterface $event
  * @return void
  */
 public function handle(EventInterface $event, $data = [])
 {
     $studio = $data['studio'];
     $event = $data['event'];
     $data['order'] = $event->children()->find('orders')->children()->findBy('uid', $data['orderId']);
     $email = new Mailer(['body' => snippet('emails/tickets-studio', $data, true), 'subject' => "[{$studio->title()->html()}] Tickets Purchased"]);
     $email->send();
     $custEmail = new Mailer(['body' => snippet('emails/tickets-customer', $data, true), 'to' => $data['order']->customerEmail()->toString(), 'subject' => "Your Tickets"]);
     $custEmail->send();
 }
示例#2
0
 /**
  * Handle the event
  *
  * @param League\Event\EventInterface $event
  * @return void
  */
 public function handle(EventInterface $event, $data = [])
 {
     $body = snippet('emails/party-request', $data, true);
     $email = new Mailer(['body' => $body, 'subject' => "[{$data['studio']->title()->html()}] Party Request"]);
     $email->send();
 }
示例#3
0
 /**
  * Handle the event
  *
  * @param League\Event\EventInterface $event
  * @return void
  */
 public function handle(EventInterface $event, $data = [])
 {
     $body = snippet('emails/contact', $data, true);
     $email = new Mailer(['to' => $data['studio']->email()->toString(), 'body' => $body, 'subject' => "[{$data['studio']->title()->html()}] Contact Enquiry from {$data['name']}"]);
     $email->send();
 }