如何使用PHPMailer在我的主题中使用随机数php函数?
$mail->Subject = '*- Mailer Tester -*';
,我想在其中添加以下代码,
rand();
注意:我已经尝试了将其添加到“ *”之后的简单解决方案,但是它只是添加了文本,因此在电子邮件主题中就像
*- Mailer Tester -* rand();
答案 0 :(得分:0)
尝试
$mail->Subject = '*- Mailer Tester -*'.rand();