如何使用codeigniter中的file_get_contents()以外的另一种方法读取html文件,并通过html邮件发送而不被撕碎?

如何使用codeigniter中的file_get_contents()以外的另一种方法读取html文件,并通过html邮件发送而不被撕碎?,file,codeigniter,html-email,phpmailer,File,Codeigniter,Html Email,Phpmailer,每当我使用file_get_contents()传递html电子邮件模板时,$body=file_get_contents($path)作为phpmailer方法的变量$mail->MsgHTML($body)邮件被撕碎 否则怎么办?文件\u会得到简单的\u html\u dom脚本的\u html()帮助吗?如何在codeigniter中运行该库?还有什么其他的可能性?我将感谢一些建议,链接等 我不知道你所说的“碎片”是什么意思,只是一种预感 $mail->CharSet='utf-8'

每当我使用file_get_contents()传递html电子邮件模板时,
$body=file_get_contents($path)
作为phpmailer方法的变量
$mail->MsgHTML($body)邮件被撕碎

否则怎么办?文件\u会得到简单的\u html\u dom脚本的\u html()帮助吗?如何在codeigniter中运行该库?还有什么其他的可能性?我将感谢一些建议,链接等


我不知道你所说的“碎片”是什么意思,只是一种预感

$mail->CharSet='utf-8';
$mail->Encoding = 'base64';