public function printReservationAjaxAction()
 {
     $args = $this->request->getArguments();
     $order = $this->orderRepository->findByUid($args['order']);
     // $GLOBALS['TSFE']->additionalHeaderData['simverbrauchsrechner'] =
     //     '<link rel="stylesheet" type="text/css" href="' . t3lib_extMgm::siteRelPath($this->request->getControllerExtensionKey()) . 'Resources/Public/Css/print.css"></link>';
     $renderer = $this->getPlainRenderer('Print', 'html');
     $renderer->assign('order', $order);
     $content = $renderer->render();
     //var_dump($result);
     //exit();
     return $content;
 }
 /**
  * zum Testen der Mail Funktion
  */
 public function sendMailAction()
 {
     $order = $this->orderRepository->findByUid(27);
     //$this->sendOrderMail($order);
     $message = 'Test<br />hier der Body der TEstmail.<hr />';
     $renderer = $this->getPlainRenderer('Mailbody', 'html');
     //damit f:translate funktioniert
     $extensionName = $this->request->getControllerExtensionName();
     $renderer->getRequest()->setControllerExtensionName($extensionName);
     $renderer->assign('order', $order);
     $siteUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
     $renderer->assign('siteUrl', $siteUrl);
     $content = $renderer->render();
     // Mail Content Array aufbauen
     $email['receiver'] = '*****@*****.**';
     //Empfängeradresse
     $email['sender'] = $this->settings['orderSenderEmail'];
     $email['subject'] = sprintf('Bestellung von %s', $order->getCustomerName());
     $email['message'] = $content;
     //$message;
     /* @var $mail \TYPO3\CMS\Core\Mail\MailMessage  */
     $mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
     $mail->setTo($email['receiver']);
     $mail->setFrom($email['sender']);
     $mail->setSubject($email['subject']);
     $mail->setBody($email['message'], 'text/html');
     //versendet html mail, alternativ: 'text/plain'
     $result = $mail->send();
     $this->view->assign('recipients', $mail->getFailedRecipients());
     $this->view->assign('result', $result);
 }