如何将变量从 phpmailer 传递到 contents.php(模板文件)?我需要传递$email
变量。
$mail -> msgHTML(file_get_contents('contents.php'), dirname(__FILE__));
内容.php
<div>
This email was sent by x. <a href="www.x.com/process_contact.php?email="<?php echo $email ?> Unsubscribe </a>from this email.
</div>