setMaxPerSecond(0); } /** * Outputs the mail to a text file according to RFC 4155. * * @throws LockAcquireException * @throws LockAcquireWouldBlockException * @throws LockCreateException */ protected function doSend(SentMessage $message): void { // Add the complete mail inclusive headers $lockFactory = GeneralUtility::makeInstance(LockFactory::class); $lockObject = $lockFactory->createLocker('mbox'); $lockObject->acquire(); // Write the mbox file $file = @fopen($this->mboxFile, 'a'); if (!$file) { $lockObject->release(); throw new \RuntimeException(sprintf('Could not write to file "%s" when sending an email to debug transport', $this->mboxFile), 1291064151); } @fwrite($file, $message->toString()); @fclose($file); GeneralUtility::fixPermissions($this->mboxFile); $lockObject->release(); } public function __toString(): string { return $this->mboxFile; } }