gpt4 book ai didi

使用模板的 php 邮件

转载 作者:行者123 更新时间:2023-12-02 06:21:44 37 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Problem when loading php file into variable (Load result of php code instead of the code as a string)

我对跟随...感到有点困惑

消息提醒功能

public static function MsgAlert($email, $name, $subject, $message)
{
$msg = include('mailer.php');

$subject = 'New Message';

if ($email != '' && validate_email($email))
{
$mailer = new PHPMailer();

$mailer->SetFrom(ADMIN_EMAIL, SITE_NAME);
$mailer->AddAddress($email);
$mailer->Subject = $subject;
$mailer->Body = Postman::nl2br($msg);
$mailer->AltBody = $msg;
$mailer->Send();
}
}

我已将我的时事通讯设计放入 mailer.php,请检查标记...

ma​​iler.php

<div>
<h1><?php $subject; ?><span>27 September 2011 at 6:26 pm</span></h1>
<div>
<p>Hello <?php $name; ?>,</p>
<?php $message; ?>
</div> <!--message container -->
</div>

我使用的方法是否正确,或者我应该做一些更好的事情,因为它不起作用。请建议。谢谢。

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com