Reputation: 439
Hi guys i have a code here for sending an email using template and i want to return the template as raw html. How can i achieve that?
$email = new Email();
$email
->template('changelogrequest')
->emailFormat('html')
->subject($subject)
->to($to)
->from($this->from)
->viewVars($data);
// get raw html here
// Log::debug($email->getLayout());
$email->send();
Upvotes: 0
Views: 122
Reputation: 439
The send() method returns an array of the email informations including the raw html. Thanks to Greg Schmidt.
$html = email->send();
Log::debug($html)
Upvotes: 1