PHPMailer-使用PHP rand();主题特征

时间:2018-09-14 06:56:01

标签: php phpmailer mailer

如何使用PHPMailer在我的主题中使用随机数php函数?

$mail->Subject = '*- Mailer Tester -*';

,我想在其中添加以下代码,

rand();

注意:我已经尝试了将其添加到“ *”之后的简单解决方案,但是它只是添加了文本,因此在电子邮件主题中就像

*- Mailer Tester -* rand();

1 个答案:

答案 0 :(得分:0)

尝试

$mail->Subject = '*- Mailer Tester -*'.rand();