如何在PHPMailer成功消息中包含html div或php?

如何在PHPMailer成功消息中包含html div或php?,php,Php,我想在PHPMailer的确认消息中包含要显示的HTML div或php页面,下面是代码: if (!$mail->send()) { $msg .= "Mailer Error: " . $mail->ErrorInfo; } else { $msg .= "Message sent! Please read the information bellow."; // here I want to display php include or html div } 现在

我想在PHPMailer的确认消息中包含要显示的HTML div或php页面,下面是代码:

if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
} else {
$msg .= "Message sent! Please read the information bellow.";   
// here I want to display php include or html div   
}

现在你可以用css将你的id_名称命名为你想要的

它是这样工作的,但是我还想包括一个完整的php页面。你说的完整的php页面是什么意思?好的,我明白了,你可以使用Header重定向到php页面你想做什么。放置headerLocation:success.php;出口你的成功信息就在这里。我想你不想重定向到另一个页面,但我想在这一部分的下面显示一个就绪的php页面:@Isabella,只需在成功部分包含你的页面。
    if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
} else {
$msg .= "<span id='id_name'>Message sent! Please read the information bellow.</span>";   
// here I want to display php include or html div   
}