/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Mailer
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Mailer/PreviewResult.php (1962B)
processMailer(clone $mailer, $method);
$mailer->reset();
}
/**
* Executes the mailer and extracts the relevant information from the generated email
*
* @param \Cake\Mailer\Mailer $mailer The mailer instance to execute and extract the email data from
* @param string $method The method to execute in the mailer
* @return void
*/
protected function processMailer(Mailer $mailer, $method)
{
if (!$mailer->viewBuilder()->getTemplate()) {
$mailer->viewBuilder()->setTemplate($method);
}
$mailer->render();
$message = $mailer->getMessage();
$this->parts = [
'html' => $message->getBodyHtml(),
'text' => $message->getBodyText(),
];
$extra = ['from', 'sender', 'replyTo', 'readReceipt', 'returnPath', 'to', 'cc', 'subject'];
$this->headers = array_filter($message->getHeaders($extra));
}
}