binaryPath, '-i', '-s']); $process->setInput($mjml); $process->setTimeout(30); $process->run(); if (! $process->isSuccessful()) { throw new ProcessFailedException($process); } $output = mb_trim($process->getOutput()); if (empty($output)) { throw new MjmlException('MJML compilation returned empty output.'); } return $output; } }