我想发送一封电子邮件,而不是'一些文本',我想要它从服务器和页面返回page.html所有的电子邮件。
$mail->Body = 'some text';
谢谢!
使用file_get_contents
实现
<?php
// this will get content of file as a string
$htmlContent = file_get_contents("path/to/page.html");
$mail->Body = $htmlContent;
?>
参考- 文件获取内容