大家好,我这里有一个使用模板发送电子邮件的代码,我想返回原始html模板。我怎样才能做到这一点?
$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();
send()方法返回包含原始html的电子邮件信息数组。多亏了格雷格·施密特。
$html = email->send(); Log::debug($html)