コード例 #1
0
 public function testRegisterOpen()
 {
     $this->emailRepository->registerOpen($this->authCode);
     $email = $this->emailRepository->findByUid(302);
     $this->assertTrue($email->isOpened(), 'email should be marked as opened');
     $this->assertRecipientListCallbackWasCalled('opened recipient2@example.com');
 }
コード例 #2
0
ファイル: EmailController.php プロジェクト: ecodev/newsletter
 /**
  * Register when an email was opened
  * For this method we don't use extbase parameters system to have an URL as short as possible
  */
 public function openedAction()
 {
     $args = $this->request->getArguments();
     $this->emailRepository->registerOpen(@$args['c']);
     // Send one transparent pixel, so the end-user sees nothing at all
     header('Content-type: image/gif');
     readfile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('newsletter', '/Resources/Private/clear.gif'));
     die;
 }